explicitly listen to all IPv4 interfaces

This commit is contained in:
Manish 2025-06-19 17:27:45 +10:00
parent 0ad78f77c0
commit 139c8832aa

View File

@ -42,6 +42,10 @@ app.get("/api/:date?", (req, res) => {
}); });
// listen for requests :) // listen for requests :)
var listener = app.listen(PORT, function () { var listener = app.listen(PORT, "0.0.0.0", function () {
console.log("Your app is listening on port " + listener.address().port); console.log(
`Your app is listening on interface ${
listener.address().address
} and port ${listener.address().port}`
);
}); });