Here is a simple guide on how to create new project and module in NodeJS.
1. Create a new project
nest new project name
2. Create a service file (user has been used as an example)
Syntax: nest g [file type] [file name] [file directory (under src directory)] For example: nest g service user (create user folder under src) logical You can also write: nest g service user (also create a user under src) The user folder contains the user.service.ts file
3. Create a Controller (user has been used as an example)
nest g controller user logical (logical can not be written)
4. Create a Module (user has been used as an example)
nest g module user logical
Similar Posts:
- [Solved] The cause of the wrong prompt instruction [ng: areq] in angular
- [Solved] Nodejs Error: Cannot find module ‘express’
- GulpThe following tasks did not complete [How to Solve]
- [Solved] PHP write file permission failure: file_put_contents: failed to open stream: Permission denied
- [Solved] RuntimeError: Model class apps.users.models.UserProfile doesn’t declare an explicit app_label and isn’t in an application in INSTALLED_APPS.
- [Two Solutions] Syntax error: unexpected token import
- Idea Error: No provider available from registry 127.0.0.1:2181 for service
- [Solved] openstack Missing value auth-url required for auth plugin password
- [How to Solve] for the right syntax to use near ”X”
- Nodejs throws an error when listening to the port under Linux