@nypl/node-lambda-boilerplate
Version:
An AWS node-lambda boilerplate written in ES7 via Babel that includes various configuration, testing, and deployment scripts
23 lines (21 loc) • 377 B
JavaScript
/* eslint-disable semi */
const Cache = {
token: null,
nodeEnv: process.env.NODE_ENV,
getToken () {
return this.token;
},
setToken (token) {
this.token = token;
},
getNodeEnv () {
return this.nodeEnv;
},
setNodeEnv (env) {
this.nodeEnv = env;
},
isProductionEnv () {
return this.nodeEnv === 'production';
}
};
export default Cache;