fix ormconfig.dev.json not being found

This commit is contained in:
2020-10-04 11:42:02 +03:00
parent 8d0aa64fd1
commit 990ad47ace

View File

@@ -25,6 +25,12 @@ const development: IConfig = {
...production,
env: EnvType.development,
jwtSecret: "DEVSECRET",
dbConnectionOptions:
process.env.NODE_ENV === "development"
? fs.existsSync("./ormconfig.dev.json")
? JSON.parse(fs.readFileSync("./ormconfig.dev.json").toString())
: null
: null,
};
const test: IConfig = {