Are there any differences between choosing this or that port? Are there any standards for picking a port?
I'm just looking for the "why" a particular port was picked to be used. There doesn't appear to be a standard convention for picking a port number(at least in documentation).
The examples in official docs use different port numbers.
as you already realized: It doesn't really matter. It should be over 1024, and maybe don't use an official port number. Also its not bad that different systems use different number as default, so they don't clash.
This means you can run an express example and an ember server side by side with the default port number.
Btw I'm pretty sure embers 4200 is a reference to the hitchhiker's guide to the galaxy.
3000 8000 and 8080 are typical dev ports. However, I would pick something obscure (but meaningful to you) to avoid port conflicts. I came up with a port number scheme where I would always start with 5 and then the other letters would be picked as follows:
5
E - 5
M - 13 (minus 10) = 3
A - 1
I - 9
L
So my port for my EMAIL server would be 55319. Crazy? Not sure, but it meant I could work out the port and never ever got a conflict. Also, hackers often scan for open ports but it takes too long to scan all ports so they just scan frequently used ports. So if you pick an obscure port then they won't scan it and will never know it is open!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With