Demo app built with Express, Mongoose to demonstrate a fully working JSON API implementation.
It is a work in progress. Some features need to be implement to have a complete working example API. Some missing features : Errors, Payload validation, etc...
Feel free to contribute to build a fully working JSON API example.
git clone https://github.com/danivek/json-api-express.git
npm install
npm start
- Browse http://localhost:8080/docs
This is a sample app modeling a blog with articles, author, comments, tags, etc...
Try some endpoints :
- http://localhost:8080/articles
- http://localhost:8080/articles?page[offset]=1&page[limit]=1
- http://localhost:8080/articles?page[number]=1&page[size]=1
- http://localhost:8080/articles?include=author,comments.author&fields[article]=title,body&fields[people]=name
- http://localhost:8080/peoples
- http://localhost:8080/comments
- http://localhost:8080/tags
- ...
Or explore api endpoints with swagger-ui at : http://localhost:8080/docs
- Sparse Fieldsets
- Sorting
- Pagination
- Inclusion
- Links
- And more...
- MongoDB - Download and Install MongoDB - you'll need mongoDB to be installed and have the
mongod
process running. - Node.js 4+ or above