RESTful API using express js (Auth) + mongoDB build simple project
1. npm i -g nodemon #If not installed 2. npm install
1. npm start #command in package.json
1. Register Api POST : http://127.0.0.1:3000/api/users 2. Auth Api POST : http://127.0.0.1:3000/api/auth #return token 3. Other api : /genres, /customers, /rentals, /movies etc. #before add header token key=x-auth-token Example. - http://127.0.0.1:3000/api/genres - http://127.0.0.1:3000/api/customers - http://127.0.0.1:3000/api/rentals - http://127.0.0.1:3000/api/movies
Can import collection data to mongoDB => resources/data/*.json
GET /api/genres
POST /api/genres
PUT /api/genres/:id
DELETE /api/genres/:id
Call api Postman