Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 01b735a

Browse files
Use process.env.PORT if available
Running the sample as an Azure web app with Node requires the app to listen on a port specified by Azure Web Apps. This requirement is likely to elude newcomers to node, so I suggest adding it by default, like the Azure AD B2C Node API demo does.
1 parent 3632677 commit 01b735a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const path = require('path');
99

1010
//initialize express.
1111
const app = express();
12-
const port = 6420;
12+
const port = process.env.PORT || 6420;
1313

1414
// Configure morgan module to log all requests.
1515
app.use(morgan('dev'));

0 commit comments

Comments
 (0)