A progressive Node.js framework for building efficient and scalable server-side applications.
nestjsx-crud TypeORM Fastify REST API
Nest TypeScript starter repository with NestJs CRUD for RESTful APIs and Fastify.
$ pnpm install
# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run start:prod
# unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:cov
nestjsx/crud Crud()
decorator generates the following API endpoints:
GET /users
GET /posts
Result: array of resources | pagination object with data, Status Codes: 200
GET /users/:id
GET /posts/:id
Request Params: :id - some resource field (slug), Result: resource object | error object, Status Codes: 200 | 404
POST /users
POST /posts
Request Body: resource object | resource object with nested (relational) resources, Result: created resource object | error object, Status Codes: 201 | 400
PATCH /users/:id
PATCH /posts/:id
Request Params: :id - some resource field (slug), Request Body: resource object (or partial) | resource object with nested (relational) resources (or partial), Result: updated partial resource object | error object, Status codes: 200 | 400 | 404
DELETE /users/:id
DELETE /posts/:id
Request Params: :id - some resource field (slug), Result: empty | resource object | error object Status codes: 200 | 404
This repo is MIT licensed.
- Refine Boilerplate for Web (PWA), Desktop and Mobile — A Cross-Platform starter template for Refine.dev that utilizes the Simple REST data provider to fetch and display data from a REST API (can easily replace with graphql data provider).