Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dpecos/rest-swagger-example
Example of a Swagger REST API in Node.js
https://github.com/dpecos/rest-swagger-example
express nodejs rest swagger
Last synced: 8 days ago
JSON representation
Example of a Swagger REST API in Node.js
- Host: GitHub
- URL: https://github.com/dpecos/rest-swagger-example
- Owner: dpecos
- Created: 2017-09-05T09:48:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-18T10:43:44.000Z (about 2 months ago)
- Last Synced: 2024-09-18T14:28:33.829Z (about 2 months ago)
- Topics: express, nodejs, rest, swagger
- Language: JavaScript
- Homepage: https://danielpecos.com/2017/09/06/rest-api-with-node-js-and-swagger
- Size: 406 KB
- Stars: 14
- Watchers: 2
- Forks: 13
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
About
=====Project showing how to setup Swagger for a REST API develop with Node.js and Express.
More details in the blog entry: https://danielpecos.com/2017/09/06/rest-api-with-node-js-and-swagger
Installation
============npm install
npm startSwagger documentation - HTML and JSON
===================================* Swagger UI:
http://localhost:3000/api/docs* JSON:
http://localhost:3000/api/docs/json
REST API Endpoints
==================* *GET* http://localhost:3000/api/stocks
* *GET* http://localhost:3000/api/stocks/1
* *POST* http://localhost:3000/api/stocks
* *PUT* http://localhost:3000/api/stocks/1