How do i know the dev RUNNING PORT


when running meteor with

meteor --port 4000

it seems nothing there.



Not sure which OS, but if you run lsof -i, you should see a list of all running processes – look for node on one port and mongodb on the next port, e.g. node on port 3000, mongodb on port 3001.


what about to knowing port at runtime in dev?

meteor --port 4000

console.log(process.env.PORT) is undefined


Sorry, I misunderstood the question. In my experience, there isn’t an easy way to get that port. Probably the “easiest” way would be to use something like Meteor.absoluteUrl() and then parse the port.