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.git
Go to the project directory
cd edustipend_pre-work
Install dependencies
npm install
Start the server
npm run start
Run 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