Bag depend on
This article focuses on which packages to install, and will be improved in the future, respectively, into the boot installation!!
The API documentation swagger
- If you don’t use
fastify
To install the following packages
npm install --save @nestjs/swagger swagger-ui-express
Copy the code
Use TypeORM+Mysql to implement data persistence
- There are two options for installing this, one is the official one below, installed separately
typeorm
和mysql
Two packages
npm install --save typeorm mysql
Copy the code
- Another is the installation package that I see that big guy article, what I use is the package that big guy uses below, be respectively
@nestjs/typeorm
.typeorm
,mysql2
Three packages
npm install --save @nestjs/typeorm typeorm mysql2
Copy the code
Form validator class-Transformer
npm install class-validator class-transformer
Copy the code
jwt
npm install @nestjs/passport passport passport-local @nestjs/jwt passport-jwt
npm install -D @types/passport-local @types/passport-jwt
Copy the code
encryption
npm install crypto-js @types/crypto-js
Copy the code
Mail server
- Because I plan to do an IT blacklist company software development, so the current thing in mind will be an additional mail server
npm install --save @nestjs-modules/mailer nodemailer
Copy the code
A link to the
- Configuring the Mail Server
- nestjs
- Nestjs Chinese document
- Typeorm Chinese document
- Refer to the post