remove typeorm connection

This commit is contained in:
Ulf Gebhardt 2023-03-10 00:21:16 +01:00
parent a240d76d15
commit 66c09d0615
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -1,27 +0,0 @@
import { createConnection, Connection } from 'typeorm'
import CONFIG from '../config'
import { entities } from '../../entity/index'
const connection = async (): Promise<Connection | null> => {
let con = null
try {
con = await createConnection({
name: 'default',
type: 'mysql',
host: CONFIG.DB_HOST,
port: CONFIG.DB_PORT,
username: CONFIG.DB_USER,
password: CONFIG.DB_PASSWORD,
database: CONFIG.DB_DATABASE,
entities,
synchronize: false,
})
} catch (error) {
// eslint-disable-next-line no-console
console.log(error)
}
return con
}
export default connection