explicitly listen to all IPv4 interfaces
This commit is contained in:
parent
0ad78f77c0
commit
139c8832aa
8
index.js
8
index.js
@ -42,6 +42,10 @@ app.get("/api/:date?", (req, res) => {
|
||||
});
|
||||
|
||||
// listen for requests :)
|
||||
var listener = app.listen(PORT, function () {
|
||||
console.log("Your app is listening on port " + listener.address().port);
|
||||
var listener = app.listen(PORT, "0.0.0.0", function () {
|
||||
console.log(
|
||||
`Your app is listening on interface ${
|
||||
listener.address().address
|
||||
} and port ${listener.address().port}`
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user