Introducing Serve: Now With Gemmi Goodness!
Posted by John on September 25th, 2007
Based on my HAML Server for Web Designers article, I’ve created a small gem “serve” which makes it extremely easy for a Web Designer to get up and running with Haml and Sass:
$ sudo gem install haml redcloth bluecloth serve
$ cd ~/Workspaces/prototype
$ ls . *
.:
index.haml
images:
logo.gif
javascripts:
prototype.js dialogs.js tabset.js
stylesheets:
application.sass dialogs.sass
$ serve
[2007-09-25 02:11:42] INFO WEBrick 1.3.1
[2007-09-25 02:11:42] INFO ruby 1.8.5 (2006-12-25)
[2007-09-25 02:11:42] INFO Serve::Server#start: pid=1626 port=3000
...
And voila! I can now access the files in ~/Workspaces/prototype at:
http://localhost:3000
Serve isn’t just a HAML or SASS server. With the proper gems it can also handle Textile and Markdown (not to mention plain Jane HTML!).
Serve also plays nicely with Rails. If you have a file named “script/server” in the current directory, Serve will execute that script instead of launching the normal WEBrick server.
Complete usage information is available with:
$ serve --help

Comments
I’ve been mulling using StaticMatic to move my static projects over to HAML, and it’s great to have another option.
Have you used StaticMatic? If so, care to share a comparison of the two?
Sorry, comments are now closed for this article.