/MExN-api-1

node js api study

Primary LanguageJavaScript

#nodejs #express #mongodb #postman #api

Tutorial by Matheus (Hora de Codar) - https://www.youtube.com/watch?v=K5QaTfE5ylk

To test the api, you can set up a mongodb atlas cluster database (free tier) and set a MONGODB_CONNECTION variable in a .env file.

Running the api:

  npm start

Will run on localhost:3000

Testing the api on Postman:

  POST /person

creating a person

  GET /person

retrieve all

  GET /person/:id

retrieve a specific person

  PATCH /person/:id

update a person

Notice the updated salary

  DELETE /person/:id

Deleting a person

Trying to find the same person