javascript typeORM ormconfig.js

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript typeORM ormconfig.js相关的知识,希望对你有一定的参考价值。



module.exports = {
   "type": "mysql",
   "host": process.env.HOST_BBDD || "localhost",
   "port": process.env.PORT_BBDD || 3306,
   "username": process.env.USER_BBDD || "root",
   "password": process.env.PASSWORD_BBDD || "admin",
   "database": process.env.DATABASE_BBDD || "gestomb",
   "synchronize": false,
   "logging": true,
   "entities": [
      "common/entity/**/*.ts"
   ],
   "migrations": [
      "common/migration/**/*.ts"
   ],
   "subscribers": [
      "common/subscriber/**/*.ts"
   ],
   "cli": {
      "entitiesDir": "common/entity",
      "migrationsDir": "common/migration",
      "subscribersDir": "common/subscriber"
   }
}

以上是关于javascript typeORM ormconfig.js的主要内容,如果未能解决你的问题,请参考以下文章

nest.js + typeORM:基本使用

从 JavaScript 生成 ERD

同构应用程序,TypeORM && TypeScript && Express && Webpack 设置问题

typeorm的 join操作

TypeORM 不会在由 TypeORM 创建的项目中生成迁移

找不到模块'@nestjs/typeorm'