From 476889751599a01966a65f4d4e66f70974750d11 Mon Sep 17 00:00:00 2001 From: Lucas Holmquist Date: Mon, 23 Apr 2018 17:53:47 +0000 Subject: [PATCH 1/2] fix: use the main prop for the application entry point. npm start will now look at the main property for the entry point. Port 8080 is now set as the default port instead of 3000. This is a fix related to bucharest-gold/centos7-s2i-nodejs#33\#issuecomment-382587104. fixes #93 --- bin/www | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/www b/bin/www index 6eb5d131..7f41f95d 100755 --- a/bin/www +++ b/bin/www @@ -32,7 +32,7 @@ const http = require('http'); * Get port from environment and store in Express. */ -const port = normalizePort(process.env.PORT || '3000'); +const port = normalizePort(process.env.PORT || '8080'); app.set('port', port); /** diff --git a/package.json b/package.json index 5065b08c..baf41a44 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,9 @@ "release": "standard-version -a", "openshift": "nodeshift --strictSSL=false --nodeVersion=8.x", "postinstall": "license-reporter report -s && license-reporter save -s --xml licenses.xml", - "start": "PORT=8080 node ./bin/www" + "start": "node ." }, + "main": "./bin/www", "standard-version": { "scripts": { "postbump": "npm run postinstall && node release.js", From fe3380e3a1823677982d08740a39c5c5fc47a85e Mon Sep 17 00:00:00 2001 From: Lucas Holmquist Date: Mon, 23 Apr 2018 17:58:43 +0000 Subject: [PATCH 2/2] fix(www): debug should take the project name as a parameter --- bin/www | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/www b/bin/www index 7f41f95d..d9e857a4 100755 --- a/bin/www +++ b/bin/www @@ -25,7 +25,7 @@ */ const app = require('../app'); -const debug = require('debug')('nodejs-rest-http:server'); +const debug = require('debug')('nodejs-rest-http-crud:server'); const http = require('http'); /**