orlandoxu / koa-easy-config

Config koa2/express with NODE_ENV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Koa easy config

Usage

folder:
path/default.js
path/production.js
path/dev.js
path/test.js

Then, use like:
const app = express();

app.use(function(req,res,next){
  req.config = require('koa-easy-config')(PATH2DIR);
  next();
});

About

Config koa2/express with NODE_ENV


Languages

Language:JavaScript 100.0%