└── lesson3_section3/
├── client/ # frontend code
│ ├── index.html
│ ├── script.js
│ └── styles.css
├── server/ # backend code
│ └── app.js
├── package.json
├── package-lock.json
└── README.md
Before you start, make sure you have Node.js and npm (the package manager for Node.js) installed on your machine.
- Open the
client
folder and view theindex.html
file in a web browser. - Note that the frontend is already built and has fields to display user information.
- From within a terminal,
cd
into the root of the repo and runnpm install
. This will install all the dependencies you need for this project. - Now, cd into the
server
folder. - Start the server by running
node app.js
. You should see the message:Server is running on port 3000
Back in your browser, click on the Get a random user
button. Notice that the user fields should now be populated.
Modify the /users
endpoint in app.js
to make a request to the Random User API and return the response to the frontend.
Good luck! 🚀