Simple question. Point port 3000 to 80 for a site

December 4, 2015 4k views
Configuration Management Node.js MEAN CMS Ubuntu

Not sure how it's done or where to look.
When I start Keystonejs it starts at port 3000 and i want to be 80....

Is there a way to do that?

Brian R.

1 comment
1 Answer

KeystoneJS apps will default to using port 3000, but they will respect the PORT environmental variable. So in order to run it on port 80, you could start it like:

PORT=80 node keystone

See the web server options in the KeystoneJS configuration docs.

In a more robust production setup, you might want to use an Nginx reverse proxy instead of serving it on port 80 directly. Check out this tutorial for more information:

by Mitchell Anicas
Node.js is an open source Javascript runtime environment for easily building server-side and networking applications. The platform runs on Linux, OS X, FreeBSD, and Windows, and its applications are written in JavaScript. Node.js applications can be run at the command line but we will...
Have another answer? Share your knowledge.