mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
config not an default but named export
This commit is contained in:
parent
f18b45e586
commit
9e45b99f98
@ -1,6 +1,7 @@
|
|||||||
// ATTENTION: DO NOT PUT ANY SECRETS IN HERE (or the .env)
|
// ATTENTION: DO NOT PUT ANY SECRETS IN HERE (or the .env)
|
||||||
|
|
||||||
import dotenv from 'dotenv'
|
import dotenv from 'dotenv'
|
||||||
|
|
||||||
dotenv.config()
|
dotenv.config()
|
||||||
|
|
||||||
const constants = {
|
const constants = {
|
||||||
@ -35,6 +36,4 @@ if (
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const CONFIG = { ...constants, ...database, ...migrations }
|
export const CONFIG = { ...constants, ...database, ...migrations }
|
||||||
|
|
||||||
export default CONFIG
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import 'reflect-metadata'
|
|
||||||
import { createDatabase } from './prepare'
|
import { createDatabase } from './prepare'
|
||||||
import CONFIG from './config'
|
import { CONFIG } from './config'
|
||||||
|
|
||||||
import { createPool } from 'mysql'
|
import { createPool } from 'mysql'
|
||||||
import { Migration } from 'ts-mysql-migrate'
|
import { Migration } from 'ts-mysql-migrate'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { createConnection } from 'mysql2/promise'
|
import { createConnection } from 'mysql2/promise'
|
||||||
|
|
||||||
import CONFIG from './config'
|
import { CONFIG } from './config'
|
||||||
|
|
||||||
export const createDatabase = async (): Promise<void> => {
|
export const createDatabase = async (): Promise<void> => {
|
||||||
const con = await createConnection({
|
const con = await createConnection({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user