sistemare class type boolean....
This commit is contained in:
18
src/utils/config.ts
Normal file
18
src/utils/config.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import dotenv from 'dotenv'
|
||||
|
||||
dotenv.config()
|
||||
let path
|
||||
switch (process.env.NODE_ENV) {
|
||||
case 'test':
|
||||
path = `${__dirname}/../../.env.test`
|
||||
break
|
||||
case 'production':
|
||||
path = `${__dirname}/../../.env.production`
|
||||
break
|
||||
default:
|
||||
path = `${__dirname}/../../.env.development`
|
||||
}
|
||||
dotenv.config({ path })
|
||||
|
||||
export const APP_ID = process.env.APP_ID
|
||||
export const LOG_LEVEL = process.env.LOG_LEVEL
|
||||
Reference in New Issue
Block a user