Created with Love for this : https://www.codepolitan.com/problemset-nodejs-dasar
- Expressjs, Mongoose and JWT for API development - Swagger and Swagger UI for documentation - AngularJS for UI - Install depedency https://github.com/swagger-api/swagger-nodenpm install -g swagger- Install all depedency
npm install- Run mongodb
mongod- Run the server
swagger project start OR npm start- Open in browser
http://localhost:10010- Open API documentation in browser
http://localhost:10010/docs/#/default- all API that related with ADD, UPDATE, DELETE must have token - to get token you must have user - to create user --> use API POST /api/authenticate/addnew - to get token --> use API POST /api/authenticate - then you can copy and paste token in parameter API like ADD, UPDATE, DELETE - all code in
api
folder
- api/connection/connection.js
is mongodb connection
- app.js
is main server js
- folder api/controllers
is all api routing
- folder api/models
is schema model for mongodb ORM
- folder api/swagger
is configuration for swagger UI
Hope will usefull for you all.
Contact Me :