Skip to content

Instantly share code, notes, and snippets.

@pookdeveloper
Last active March 30, 2022 13:11
Show Gist options
  • Save pookdeveloper/634135447950341d5d0fb70e9c1f3785 to your computer and use it in GitHub Desktop.
Save pookdeveloper/634135447950341d5d0fb70e9c1f3785 to your computer and use it in GitHub Desktop.
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 || "mydatabase",
"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"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment