Skip to content

Instantly share code, notes, and snippets.

@birendra-b
Created June 29, 2020 16:45
Show Gist options
  • Save birendra-b/75f6c1137255d8a5c7243051e56b1859 to your computer and use it in GitHub Desktop.
Save birendra-b/75f6c1137255d8a5c7243051e56b1859 to your computer and use it in GitHub Desktop.
src/db.ts
import "reflect-metadata";
import {createConnection} from "typeorm";
import logger from '@shared/Logger';
async function intializeDB(): Promise<void> {
await createConnection()
logger.info('Database successfully initialized');
}
// Export express instance
export default intializeDB;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment