eye_mew
eye_mew

Reputation: 9133

Simple static node.js http server in the cloud

I've spun up a Digital Ocean server, and I'm trying to serve a simple static web page. This answer recommended I use the http-server package. I can start serving on http://localhost:8080 by simply running:

http-server 

Neat. How do I actually serve the page up remotely though, so that I'd be able to access it on my desktop by using the external IP of the server, for example, http://139.32.5.6?

This is probably a really silly question.

Upvotes: 0

Views: 53

Answers (1)

mscdex
mscdex

Reputation: 106696

According to the http-server readme, the address to listen on defaults to 0.0.0.0, so you should be able to reach it from outside of localhost, provided you don't have firewalls and such blocking incoming traffic to that port.

Upvotes: 1

Related Questions