To fix Node.js connect only working on localhost, we call listen
with '0.0.0.0'
.
For instance,. we write
const app = connect().use(connect.static("public")).listen(3000, "0.0.0.0");
to call listen
with "0.0.0.0"
to listen for requests from all IP addresses.