2016-12-30 18:35:19 +00:00
|
|
|
import Logger from './logger';
|
|
|
|
|
2017-01-02 19:39:44 +00:00
|
|
|
export default class {
|
2016-12-30 18:35:19 +00:00
|
|
|
static show(): void {
|
|
|
|
const env = process.env.NODE_ENV;
|
|
|
|
let logger = new Logger('Env');
|
|
|
|
logger.info(typeof env == 'undefined' ? 'NODE_ENV is not set' : `NODE_ENV: ${env}`);
|
|
|
|
if (env !== 'production') {
|
|
|
|
logger.warn('The environment is not in production mode');
|
|
|
|
logger.warn('Do not use for production purpose');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|