donal
2018-06-14 3fc2eaf8a148c5918e1a0478d66e4cf117ed22e5
FIX - issue with NODE_ENV
3 files modified
16 ■■■■ changed files
package-lock.json 4 ●●●● patch | view | raw | blame | history
package.json 1 ●●●● patch | view | raw | blame | history
server/config/express.js 11 ●●●● patch | view | raw | blame | history
package-lock.json
@@ -4389,7 +4389,7 @@
          "integrity": "sha1-ib2d9nMrUSVrxnBTQrugLtEhMe8=",
          "dev": true,
          "requires": {
            "ms": "0.7.1"
            "ms": "0.6.2"
          }
        },
        "diff": {
@@ -9241,7 +9241,7 @@
      "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,
package.json
@@ -23,7 +23,6 @@
  },
  "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",
server/config/express.js
@@ -26,16 +26,9 @@
  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
  }