npm i -g @nestjs/cli
nest new
nest g co
/ nest generate controller
nest g s
nest g module <name_of_module>
@Module()
@<HTTP Methods>
@Param()
@Query()
@Body
@HttpCode(HttpStatus.<code>)
@Res()
new HttpExeption()
new NotFoundException
@Injectable()
@Entity()
@PrimaryGeneratedColumn
@Column
@JoinTable()
@ManyToMany(()=> <Relation>, (relation)=> relation.field)
@InjectRepository(<name>)
Node.js makes not assumptions and includes nothing my default. Developer are in charge of setting up everything they want, this applies to everything from setting up routing, API calls, setting up web sockets and even code organization, file structure etc… NestJS let's you focus on the application problem at hand instead of the tiny implementation details ↩
For not creating test files ↩
Stimulate a command ↩
When throwing random error. NestJS automatically throes internal servererrorr ↩
Inject dependencies ↩
If set to true, if a field that is not on the DTO is passed it will throw an error ↩
If set to true, the body will be an instance of DTO class, and type casing as well ↩