benams
benams

Reputation: 4656

access rails server from multiple machines

I run a rails server rails server -b 10.0.0.2 -p 3001 on my linux machine, so people in my office can access it from the ip above.

I want to make it possible to connect to this server from other machines, and from my own PC as well (with localhost:3001).

Any ideas how can I create a situation that both 10.0.0.2:3001 and localhost:3001 works with a single rails server command?

Upvotes: 0

Views: 52

Answers (1)

dx7
dx7

Reputation: 812

You need to bind on 0.0.0.0.

rails server -b 0.0.0.0 -p 3001

Upvotes: 1

Related Questions