Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (22 sloc) 1.55 KB

quick_serve

quick_serve is a super-simple way of serving static files for development. It was made mainly for javascript and css development, but might have other uses.

General usage

Type 'qs' or 'quick_serve'. It will start a mongrel web server using the current directory as docroot. By default it will use port 5000, but if you run 'qs -p 4000' it will use 4000 (or any other you specify). Type 'qs -h' for more options.

Snapshot mode usage

When evoked with -s trailed with an url, quick_serve will fetch the url and serve it regardless of the path you call. It's useful for testing js/css as it serves the snapshot from memory, minimizing cpu/memory usage leaving the browser with reloading js/css.

Rails usage

quick_serve has a Rails adapter which can be called by adding this in environment.rb:

require 'quick_serve'

It's aimed at giving you a boost of speed on resource hungry pages when you're working on js/css. It will store all generated pages requested with GET and having no flash on it and free the snapshot collection when:

  • Any object is saved or destroyed in ActiveRecord

  • Any file is changed in the app/ directory

Keep in mind, it will run only in development mode.

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request.

Copyright

Copyright © 2009 Marcin Bunsch . See LICENSE for details.