https://github.com/jiayisheji/blog/issues/18
vs code推荐插件:(其他插件自己随意)
Debugger for Chrome – 调试
ejs – ejs文件高亮
Beautify – 代码格式化
DotENV – .env文件高亮
Jest – nest默认测试框架支持
TSLint – ts语法检查
TypeScript Hero – ts提示
vscode-icons – icons
https://medium.com/@shaibenshimol/nestjs-and-mysql-in-10-minutes-711e02ec1dab
ormconfig.json { "type": "mysql", "host": "localhost", "port": 3306, "username": "root", "password": "root", "database": "my_nestjs_project", "entities": ["src/**/**.entity{.ts,.js}"], "synchronize": true, "extra": { connectionLimit: 10, ... } } Very Important !! app.module
import { Module } from '@nestjs/common'; import { UsersModule } from './users/users.module'; import { TypeOrmModule } from '@nestjs/typeorm'; @Module({ imports: [ TypeOrmModule.forRoot(), UsersModule ], }) export class AppModule {} =====nest command can use or not=====
nest g module users nest g service users nest g controller users nest g class users/user.