A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.
Nest framework TypeScript starter repository.
Example of how you can use child processing to fetch and manipulate response data from DB.
For the first time when you call /cats API you will receive a response from dbService. All next responses will be returned by components cache, but in the background, the cache will be updated/changed by the forked childProcessor which calls dbService.
This example is proof of concept of how you can use child processing. Two examples of child processing:
- one example shows you how to fork
child
file for child processing - the second example shows you how to fork the whole NestJS module for child processing
Note: This is only proof of concept and It needs modification to be used in production environment.
Exposed API:
http://localhost:3000/cats
$ 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.