We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1182375 commit 568de78Copy full SHA for 568de78
ormconfig.ts
@@ -1,5 +1,5 @@
1
import { existsSync } from 'fs';
2
-import type { DataSourceOptions } from 'typeorm';
+import {DataSource, DataSourceOptions} from 'typeorm';
3
import { SnakeNamingStrategy } from 'typeorm-naming-strategies';
4
5
import './src/util/dotenv';
@@ -39,3 +39,6 @@ if (existsSync('./ormconfig.local.ts'))
39
}
40
41
export default ormConfig;
42
+
43
+// Also export the data source as an object for use with the typeorm cli
44
+export const dataSource = new DataSource(ormConfig);
0 commit comments