running now
This commit is contained in:
parent
85cd083750
commit
c17bb05f0a
25 changed files with 156 additions and 114 deletions
|
|
@ -2,7 +2,13 @@ import "reflect-metadata";
|
|||
import { DataSource } from "typeorm";
|
||||
|
||||
import * as dotenv from "dotenv";
|
||||
import { UserEntity } from "./entities/UserEntity";
|
||||
import { UserEntity } from "./entities/UserEntity.js";
|
||||
|
||||
import { fileURLToPath } from "url";
|
||||
import { dirname, join } from "path";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
dotenv.config();
|
||||
|
||||
|
|
@ -20,7 +26,7 @@ export const AppDataSource = new DataSource({
|
|||
synchronize: NODE_ENV === "dev" ? false : false,
|
||||
//logging logs sql command on the terminal
|
||||
logging: NODE_ENV === "dev" ? false : false,
|
||||
entities: [UserEntity],
|
||||
migrations: [__dirname + "/migration/*.ts"],
|
||||
entities: [join(__dirname, "/entities/*.{ts,js}")],
|
||||
migrations: [join(__dirname, "/migrations/*.{ts,js}")],
|
||||
subscribers: [],
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue