From 34b8c91281e24d11b36e06b773c4ffaa58206fba Mon Sep 17 00:00:00 2001 From: Lucas Holmquist Date: Mon, 23 Apr 2018 17:30:26 +0000 Subject: [PATCH] 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 https://github.com/bucharest-gold/centos7-s2i-nodejs/issues/33\#issuecomment-382587104. fixes #98 --- bin/www | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/www b/bin/www index 6eb5d13..7f41f95 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 e9fcd8e..fc74443 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,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",