Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
新增方法获取环境配置项
Browse files Browse the repository at this point in the history
  • Loading branch information
einsqing committed Oct 17, 2018
1 parent d954d55 commit f728e10
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ function expressMiddlewareToKoaMiddleware(fn) {
};
}

/**
* get env
* @param {*} name
*/
function getEnv(name) {
return process.env[name];
}

module.exports = {
getEnv,
getBookshelf,
expressMiddlewareToKoaMiddleware
};

0 comments on commit f728e10

Please sign in to comment.