Start server, browser and reload with one command
Posted on May 07, 2008 at 05:32 PM
While developing rails applications I find myself starting and stopping mongrel a bunch of times. At Todobebé we have 4 different apps to deal with and sometimes I want to start and stop a couple of them in succession.
I put together a couple of quick aliases in my .bash_profile to help me with that process. All I have to do now is browse to app root, and type
ssthat causes the server to start, brings up a browser window with a new tab and browses to http://0.0.0.0:3000.
I have also create ss1 and ss2, you can have as many as you would. Here is how I did it.
alias ss="sleep 3 && open /Applications/Safari.app http://0.0.0.0:3000 & script/server -p 3000" alias ss1="sleep 3 && open /Applications/Safari.app http://0.0.0.0:3001 & script/server -p 3001" alias ss2="sleep 3 && open /Applications/Safari.app http://0.0.0.0:3002 & script/server -p 3002"
Comments
There are 0 comments on this post. Post yours →
Post a comment
Required fields in bold.