Running meteor app with no port on localhost


#1

Sorry if this is duplicated, after searching the forums and online was unable to find if this was possible.

Is there any way to run a meteor server locally without a port number? I know you can set a different port using `–p [port#] but was wondering if it was possible to start the server simply on just http://localhost?


#2

sudo meteor --port 80

You need root to run on port 80.

BTW, wondering if giving root to meteor makes it more vulnerable?


#3

Thanks for your reply :slight_smile: im pretty new to meteor as well as infrastructure an all this port malarky!

with the above in mind, im pretty sure that giving your app root is going to make it more vulnerable, especially in a production environment.

have come across this though https://github.com/arunoda/node-userdown

sorry if this isn’t new to you, like I say i’m just starting off learning!

you might be able to make more sense out of it than me, but hope it helps.


#4

here’s a good article on the topic

and some info on why you need sudo privileges for ports 0-1023 https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports

Pretty much http://localhost is equivalent to http://localhost:80, http assumes 80 as the default port if none is specified. For https 443 is the default. But usually running on port 80 isn’t advised, both because it requires sudo privileges and because typically only one process can be running on that port at a time, so nothing else on your machine can run on port 80. In production you’d never wanna do this, you’d want your server’s process to run on another port (say 3010), and then have a reverse proxy (such as nginx) to route requests from port 80 to your app running on port 3010