The purpose of this course is to learn how to use NodeJs and use it to build an API from scratch.
Lien GitHub (Public repository)
- To launch the app you first need to clone the repo with this url : https://github.com/AlexandreMarcos94/NodeJSLessons.git
- Go in the server directory
- npm run dev
- You can access it on : http://localhost:3000
Method : GET | Endpoint : http://localhost:3000/products
Method : GET | Endpoint : http://localhost:3000/products/{name}
- Example : http://localhost:3000/products/pomme
Method : DELETE | Endpoint : http://localhost:3000/products/{name}
- Example : http://localhost:3000/products/pomme
Method : POST | Endpoint : http://localhost:3000/products
- Product format :
{
"name" : {name}
"quantity": {quantity}
}
- Example :
{
"name" : "Fraise"
"quantity": 500
}