Setup logger, configloader, middleware & endpoints
This commit is contained in:
15
api/config/environmentVariables.js
Normal file
15
api/config/environmentVariables.js
Normal file
@@ -0,0 +1,15 @@
|
||||
class EnvironmentVariables {
|
||||
constructor(variables) {
|
||||
this.variables = variables || process.env;
|
||||
}
|
||||
|
||||
get(variable) {
|
||||
return this.variables[variable];
|
||||
}
|
||||
|
||||
has(variable) {
|
||||
return this.get(variable) !== undefined;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = EnvironmentVariables;
|
||||
Reference in New Issue
Block a user