Significance of port 3000 in Express apps

3000 is a somewhat arbitrary port number chosen because it allows you to experiment with express without root access (elevated privilege). Ports 80 and 443 are the default HTTP and HTTPS ports but they require elevated privilege in most environments.

Using port 3000 in examples also helps indirectly emphasize that you ideally want to put your express app behind nginx or Apache httpd or something like that which would listen on port 80 and/or 443.

There is no reason (that I’m aware of, anyway) why 3000 is better than 8000 or 4000 or 8080 or any of a number of other port numbers that are accessible without elevated privileges.

Leave a Comment