开发者

Starting rails server for different apps

开发者 https://www.devze.com 2023-02-18 07:28 出处:网络
If I am working on two different rails apps (app_one, app_two), how does the rails server work when I switch from working on app_one to workin开发者_高级运维g on app_two? Does app_two show up in a dif

If I am working on two different rails apps (app_one, app_two), how does the rails server work when I switch from working on app_one to workin开发者_高级运维g on app_two? Does app_two show up in a different port? When I go to localhost:3000 it keeps showing app_one. I tried closing all of my terminals and then rebooting the rails server from the app_two root directory, but I still get app_one at localhost:3000


When starting your server you can specify a port:

rails s -p 3000 #rails 3 server starting on port 3000 (default)
rails s -p 3001 #rails 3 server starting on port 3001

or for rails 2:

script/server -p 3000
script/server -p 3001

Then you can switch between the two at will

0

精彩评论

暂无评论...
验证码 换一张
取 消