Created
June 29, 2020 16:45
-
-
Save birendra-b/75f6c1137255d8a5c7243051e56b1859 to your computer and use it in GitHub Desktop.
src/db.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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