lad
Version:
Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
14 lines (10 loc) • 423 B
JavaScript
const path = require('path');
const test = process.env.NODE_ENV === 'test';
// note that we had to specify absolute paths here bc
// otherwise tests run from the root folder wont work
const env = require('@ladjs/env')({
path: path.join(__dirname, '..', test ? '.env.test' : '.env'),
defaults: path.join(__dirname, '..', '.env.defaults'),
schema: path.join(__dirname, '..', '.env.schema')
});
module.exports = env;