backend/src/loaders/database.ts
2020-12-05 19:09:08 +01:00

10 lines
287 B
TypeScript

import { createConnection } from "typeorm";
/**
* Loader for the database that creates the database connection and initializes the database tabels.
*/
export default async () => {
const connection = await createConnection();
connection.synchronize();
return connection;
};