mirror of
https://github.com/usatiuk/photos.git
synced 2025-10-28 15:27:49 +01:00
11 lines
292 B
TypeScript
11 lines
292 B
TypeScript
import "../entity/User";
|
|
|
|
import { Connection, createConnection } from "typeorm";
|
|
import { config } from "./";
|
|
|
|
export async function connect(): Promise<Connection> {
|
|
return config.dbConnectionOptions
|
|
? createConnection(config.dbConnectionOptions)
|
|
: createConnection();
|
|
}
|