Skip to content

Commit c0b83bc

Browse files
committedJul 12, 2020
chore: make a port configurable by PORT env variable
1 parent b23fce0 commit c0b83bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/templates/app.js.ejs

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ app.get('<%- endpoint.path %>', (req, res) => {
2424
})
2525
<% }); %>
2626

27-
app.listen(3000, () => {
28-
console.log('Listen on 3000')
27+
const port = process.env.PORT || 3000;
28+
app.listen(port, () => {
29+
console.log(`Listen on ${port}`)
2930
})

0 commit comments

Comments
 (0)
Please sign in to comment.