You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You just made your first endpoint! This function will respond to a GET request at http://localhost:8000/users with a JSON file, which includes our mockData under the key 'users'. Let's test it out!
Restart your server (CTRL+C, then run node server.js) since we changed the file. Open a browser and navigate to http://localhost:8000/users
You should see a JSON file, served up from your terminal!💁
Now that our server is listening for requests being made on localhost:8000 let's return some mock JSON data. Add the following to your server.js file:
Overall your file should look like this:
Let's save your changes on GitHub:
The text was updated successfully, but these errors were encountered: