I try to run this simple code but I can't find the desire output.
var express = require('express'),
app = express(),
path = require('path')
cookieParser = require('cookie-parser')
session = require('express-session');
app.set('views', path.join(__dirname , 'views'));
app.use(express.static(path.join(__dirname,'public')));
var env = process.env.NODE_ENV || 'development';
if(env === 'development'){
// dev specific settings
} else {
//Production specific settings
}
require('./routes/routes.js')(express,app);
app.listen (3000 , function(){
console.log('Mode:'+ env);
});
RUN ON Window CMD : > set NODE_ENV = develoment
node app.js
> Mode : development
but when -
RUN ON Window CMD : > set NODE_ENV = production
node app.js
> Mode : development // again same thing