- https://github.com/nestjs/nest
- Linha de comando: https://docs.nestjs.com/cli/overview
- Typescript por padrão
- Criação de um projeto:
nest new hello-nest
yarn install
yarn start
-
As rotas vem nos controllers como annotations do typescript
-
Vem com injeção de dependência
-
As rotas GET http://localhost:3000/hello e GET http://localhost:3000/hello/test são criadas dessa forma:
import { Controller, Get } from '@nestjs/common'; @Controller('Hello') export class HelloController { @Get() getHello(): Object { return { test: 'test', }; } @Get('test') Test(): Object { return { test2: 'test2', }; } }
-
Integração com o mongoose: https://docs.nestjs.com/techniques/mongodb
-
Integração com o typeorm: https://docs.nestjs.com/techniques/database
-
Integração com o Kafka: https://docs.nestjs.com/microservices/kafka
-
Executando em um docker node: https://blog.logrocket.com/containerized-development-nestjs-docker/
-
Tutorial: https://scotch.io/tutorials/building-a-modern-app-using-nestjs-mongodb-and-vuejs