This is a simple API like a JSON Placeholder but it is based on the nest js framework
GET: /users
GET: /users/:id
GET: /users/:id/posts
GET: /users/:id/todos
GET: /users/:id/albums
POST: /users
PUT: /users/:id
PATCH: /users/:id
DELETE: /users/:id
GET: /posts?userId=userId
GET: /posts/:id
GET: /posts/:id/comments
POST: /posts
PUT: /posts/:id
PATCH: /posts/:id
DELETE: /posts/:id
GET: /comments?postId=postId
GET: /comments/:id
POST: /comments
PUT: /comments/:id
PATCH: /comments/:id
DELETE: /comments/:id
GET: /todos?userId=userId
GET: /todos/:id
POST: /todos
PUT: /todos/:id
PATCH: /todos/:id
DELETE: /todos/:id
GET: /albums?userId=userId
GET: /albums/:id
GET: /albums/:id/photos
POST: /albums
PUT: /albums/:id
PATCH: /albums/:id
DELETE: /albums/:id
GET: /photos?albumId=albumId
GET: /photos/:id
POST: /photos
PUT: /photos/:id
PATCH: /photos/:id
DELETE: /photos/:id
For correct working it needs to be worked mongodb on url: mongodb://127.0.0.1:27017/sandbox by default you can change it if you want Mongodb can be installed locally on your computer:
- 1: https://www.mongodb.com/docs/manual/installation/
- 2: https://www.mongodb.com/try/download/compass
or it can be installed inside docker container:
- 1: https://www.docker.com/products/docker-desktop/
- 2: https://hub.docker.com/_/mongo
- 3: https://hub.docker.com/_/mongo-express
A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.