ormconfig.json Is Incorrect uses *.js instead of *.ts
Kurry opened this issue · 2 comments
Kurry commented
The current ormconfig.json file has *.js instead of *.ts.
{
"name": "default",
"type": "mysql",
"host": "localhost",
"port": 3306,
"username": "test",
"password": "test",
"database": "test",
"synchronize": true,
"logging": false,
"entities": [
"src/entity/*.js"
],
"subscribers": [
"src/subscriber/*.js"
],
"migrations": [
"src/migration/*.js"
],
"cli": {
"entitiesDir": "src/entity",
"migrationsDir": "src/migration",
"subscribersDir": "src/subscriber"
}
}
This is what is on the website:
http://typeorm.io/#/
{
"type": "mysql",
"host": "localhost",
"port": 3306,
"username": "test",
"password": "test",
"database": "test",
"synchronize": true,
"logging": false,
"entities": [
"src/entity/**/*.ts"
],
"migrations": [
"src/migration/**/*.ts"
],
"subscribers": [
"src/subscriber/**/*.ts"
]
}
pleerock commented
Both are correct. It really depends on what toolings you use. If you use ts-node then you can use .ts format. If you simply use node then you don't have a choice and must use .js format, but you need to make sure to specify paths where compiled output (generated js files) are going.
Kurry commented
Thanks!