Files
speckle-server/packages/server/bootstrap.js
T
2022-03-16 17:31:53 +02:00

14 lines
399 B
JavaScript

/**
* Bootstrap module that should be imported at the very top of each entry point module
*/
const appRoot = require('app-root-path')
const dotenv = require('dotenv')
const { isTestEnv } = require('./modules/core/helpers/envHelper')
// If running in test env, load .env.test first
if (isTestEnv()) {
dotenv.config({ path: `${appRoot}/.env.test` })
}
dotenv.config({ path: `${appRoot}/.env` })