Is there an easy way to fire up a web browser for a folder?
eg.
I am in a folder that contains a website (index.html and other files) and I want to browse the site through a browser. Is there a gem that I just launch to make this folder browsable?
In this way I don’t have to install nginx just for a specific folder. And when you install nginx you have to bother with configuration files and so on.
Kinda how Rails does it with:
rails server
Yes, there is… Throw the following in a file called webserver:
Then, perform the following (This assumes Mac OSX):
Now, just run
webserverfrom the directory you want to use as the document root. A webserver will now be running on localhost:3000.Hope this helps!
UPDATE
I just remembered after reading a post on Phusion Passenger 3.0 progress that there will be a passenger lite option…