How to start Meteor on different port

By default, Meteor app start on port 3000


$ meteor
[[[[[ ~/path-to/meteor/hello ]]]]]

=> Started proxy.                             
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:3000/

1. Meteor Port 9999

To start Meteor app on a different port, start Meteor with --port parameter.


$ meteor --port 9999
[[[[[ ~/path-to/meteor/app ]]]]]

=> Started proxy.                             
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:9999/

2. Meteor Port 80

For port lower than 1024, need sudo


$ meteor --port 80
Error: listen EACCES   

$ sudo meteor --port 80
[[[[[ ~/path-to/meteor/app ]]]]]

=> Started proxy.                             
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:80/
Note
For production deployment, better use Meteor Up, or start a Meteor app on another port and setup a reverse proxy in web server.

mkyong

Founder of Mkyong.com, passionate Java and open-source technologies. If you enjoy my tutorials, consider making a donation to these charities.

0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments