Skip to content

Commit 7f7920b

Browse files
committed
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 nodeshift-archived/centos7-s2i-nodejs#33\#issuecomment-382587104. fixes nodeshift-starters#11
1 parent 46004ab commit 7f7920b

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

cute-name-service/bin/www

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const http = require('http');
3232
* Get port from environment and store in Express.
3333
*/
3434

35-
const port = normalizePort(process.env.PORT || '8081');
35+
const port = normalizePort(process.env.PORT || '8080');
3636
app.set('port', port);
3737

3838
/**

cute-name-service/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "nodejs-cache-cute-name",
33
"version": "1.0.0",
4-
"main": "false",
54
"author": "Red Hat, Inc.",
65
"license": "Apache-2.0",
76
"scripts": {
@@ -15,8 +14,9 @@
1514
"prepublish": "license-reporter report",
1615
"openshift": "nodeshift --strictSSL=false --nodeVersion=8.x",
1716
"postinstall": "license-reporter report && license-reporter save --xml licenses.xml",
18-
"start": "PORT=8080 node ./bin/www"
17+
"start": "node ."
1918
},
19+
"main": "./bin/www",
2020
"xo": {
2121
"space": 2,
2222
"rules": {

greeting-service/bin/www

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const http = require('http');
3232
* Get port from environment and store in Express.
3333
*/
3434

35-
const port = normalizePort(process.env.PORT || '3000');
35+
const port = normalizePort(process.env.PORT || '8080');
3636
app.set('port', port);
3737

3838
/**

greeting-service/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
1313
"ci": "npm run lint && npm run test",
1414
"dependencyCheck": "szero . --ci",
15-
"start": "PORT=8080 node ./bin/www",
15+
"start": "node .",
1616
"prepublish": "license-reporter report",
1717
"openshift": "nodeshift --strictSSL=false --nodeVersion=8.x",
1818
"postinstall": "license-reporter report && license-reporter save --xml licenses.xml"
1919
},
20+
"main": "./bin/www",
2021
"xo": {
2122
"space": 2,
2223
"rules": {

0 commit comments

Comments
 (0)