A simple Node.js service that exposes two API endpoints: "api/comments" and "api/posts", with an option for limiting query results.
Clone the project
git clone https://github.com/Chiemezuo/edustipend_pre-work.gitGo to the project directory
cd edustipend_pre-workInstall dependencies
npm installStart the server
npm run startRun the URL in your browser
http://localhost:3000/api/FINALPATH[?limit=x]Where FINALPATH is either "posts" or "comments", and what is in the square brackets is an optional query parameter, where x is a positive integer.
Click here, and then modify the URL by appending:
/api/FINALPATH[?limit=x]Where FINALPATH is either "posts" or "comments", and what is in the square brackets is an optional query parameter, where x is a positive integer