<<<<<<< HEAD
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.
A general practice of using Nest.js
npm install -g @nestjs/cli
nest new <>
Create a new module with the specified name and generate the necessary files and code structure for the module (Make sure you are in the root directory of your Nest.js project.)
nest generate module <>
To generate a controller file with a specific name and directory structure in a Nest.js project using the Nest.js CLI
nest generate controller messages/messages --flat
-
nest generate controller: This part of the command tells the Nest.js CLI to generate a controller.
-
messages/messages: This specifies the name and directory structure for the generated controller. In this case, it creates a controller named "messages" within a directory named "messages" (nested controller).
-
--flat: The --flat option is used to generate the controller file directly in the src/ directory, without creating a subdirectory for it. It ensures that the generated controller file is placed at the root level of the src/ directory.
The command is useful in scenarios where you want to create a controller with a specific name and directory structure. It allows you to organize your controllers in a hierarchical manner by creating subdirectories for different sections or features of your application.
main