Sample of using http://swagger.io/ for nodejs especially express framework.
- Install depedency https://github.com/swagger-api/swagger-node
npm install -g swagger- Install all depedency
npm install- Run mongodb
mongod- Run the server
swagger project start- Open swagger editor
swagger project edit- Open API documentation in browser
http://localhost:10010/docs/#/default
- 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 :