I am using locomotivejs for my node project. When I fire the lcm server command locomotive listen to port 3000 as default. I tried to change it but nothig worked. I thin I am missing something. From where should I change the listened port for lcm server command?
Asked
Active
Viewed 240 times
2 Answers
4
You can pass a the port as an option to the lcm
command using -p
, as such:
lcm server -p 1234
Ref: The source never lies ; )

Jeff Escalante
- 3,137
- 1
- 21
- 30
-
Thank you, that worked for me :) By the way is there a way to change the default from 3000 to another value – SamSamet Oct 24 '13 at 18:12
-
Not other than creating a bash alias or editing the source directly to change the default : ) – Jeff Escalante Oct 24 '13 at 18:13
-
Also, if this solution worked, make sure to mark it as correct so that if anyone else finds this question they will know! – Jeff Escalante Oct 24 '13 at 18:17
-
Ok I am marking it now :D I tried a couple of time to change the default by editing the source but It didnt worked, do u have any idea about this ? – SamSamet Oct 24 '13 at 18:20
-
I would not recommend editing the source, honestly. I would make an alias in your bash profile like `alias lcms="lcm server -p 1234"` – Jeff Escalante Oct 24 '13 at 19:55
0
Jeff right, you could use following command:
lcm server -p [port_number]
where [port_number] is the port you want to use.
Other approach is to set env
variable PORT
and it'll do the same.
Probably you'll find interesting following way to get more information about server
command:
lcm server -h

andbas
- 591
- 4
- 8