FIX - issue with NODE_ENV
| | |
| | | "integrity": "sha1-ib2d9nMrUSVrxnBTQrugLtEhMe8=", |
| | | "dev": true, |
| | | "requires": { |
| | | "ms": "0.7.1" |
| | | "ms": "0.6.2" |
| | | } |
| | | }, |
| | | "diff": { |
| | |
| | | "optional": true |
| | | }, |
| | | "uglify-js": { |
| | | "version": "2.6.0", |
| | | "version": "2.4.24", |
| | | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.24.tgz", |
| | | "integrity": "sha1-+tV1XB4Vd2WLsG/5q25UjJW+vW4=", |
| | | "dev": true, |
| | |
| | | }, |
| | | "devDependencies": { |
| | | "blanket": "1.2.3", |
| | | "connect-livereload": "0.6.0", |
| | | "fs-extra": "5.0.0", |
| | | "grunt": "1.0.2", |
| | | "grunt-build-control": "0.7.1", |
| | |
| | | app.use(methodOverride()); |
| | | app.use(cookieParser()); |
| | | if ('production' === env || 'dev' === env || 'test' === env) { |
| | | // app.use(express.static(path.join(config.root, 'public'))); |
| | | // app.set('appPath', path.join(config.root, 'public')); |
| | | app.use(morgan('dev')); |
| | | } |
| | | |
| | | if ('development' === env || 'test' === env) { |
| | | app.use(require('connect-livereload')()); |
| | | app.use(express.static(path.join(config.root, '.tmp'))); |
| | | app.use(express.static(path.join(config.root, 'client'))); |
| | | app.set('appPath', path.join(config.root, 'client')); |
| | | } else { |
| | | // else 'development' |
| | | app.use(morgan('dev')); |
| | | app.use(errorHandler()); // Error handler - has to be last |
| | | } |