TypeOrmModule.forRoot({
type: ‘mysql’,
host: ‘10.86.10.41’,
port: 3306,
username: ‘root’,
password: ‘root’,
database: ‘typeorm’,
entities: [__dirname + ‘/**/*.entity{.ts,.js}’],
synchronize: false,
}
里面的entities里面不能为空
根据自己的项目填写
__dirname + '/**/*.entity{.ts,.js}'