config not an default but named export

This commit is contained in:
Ulf Gebhardt 2023-06-07 13:31:11 +02:00
parent f18b45e586
commit 9e45b99f98
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
3 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,7 @@
// ATTENTION: DO NOT PUT ANY SECRETS IN HERE (or the .env)
import dotenv from 'dotenv'
dotenv.config()
const constants = {
@ -35,6 +36,4 @@ if (
)
}
const CONFIG = { ...constants, ...database, ...migrations }
export default CONFIG
export const CONFIG = { ...constants, ...database, ...migrations }

View File

@ -1,6 +1,5 @@
import 'reflect-metadata'
import { createDatabase } from './prepare'
import CONFIG from './config'
import { CONFIG } from './config'
import { createPool } from 'mysql'
import { Migration } from 'ts-mysql-migrate'

View File

@ -1,6 +1,6 @@
import { createConnection } from 'mysql2/promise'
import CONFIG from './config'
import { CONFIG } from './config'
export const createDatabase = async (): Promise<void> => {
const con = await createConnection({