- Node.js & Express
- MongoDB
- Postman (to send HTTP requests)
- Download the code or clone it to your local repository.
npm install
all dependencies frompackage.json
.- Run
app.js
on a local node server (default PORT number: 3000).
On the bottom of app.js
there's a Listen
function that use the default port - 3000.
To change the port number, you need to change the arg inside the function from "3000" to your preferred port.
app.listen(3000, function () {
-
If you wish to target ALL the objects, use this URL:
- localhost:PortNumber/articles/
- Example: localhost:3000/articles/
-
If you wish to target a specific object, use this URL:
- localhost:PortNumber/articles/ArticleTitle
- Example: localhost:3000/articles/API
If you wish to add Key:Value
pairs for your request (for example, for a put
request), tap on
the "Body" section inside your request in postman, and select "x-www-form-urlencoded" encoding.
Here you can add as many Key:Value
pairs as you like.