Project

vienna

0.02
No commit activity in last 3 years
No release in over 3 years
Tiny, zero-configuration static file server
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 5.0
~> 12.0
~> 0.9

Runtime

~> 2.0
 Project Readme

Vienna

Vienna is a tiny, zero-configuration static file server built on top of rack. The goal is to place everything in /public, add two lines to our config.ru and let Vienna take care of the rest.

Why Vienna? Because it's an awesome city and It's the first thing that came to my mind. (I must have gotten the idea from Cuba.)

Installation

Add this line to your application's Gemfile:

gem 'vienna'

And then execute:

bundle

Or install it yourself, run:

gem install vienna

Usage

Place your static files in /public, optionally create /public/404.html and add this to your config.ru:

require 'vienna'
run Vienna

You're done. Now you can deploy to heroku or any other place that supports rack-based apps. This should also work for most apps built with Jekyll or Middleman as long as you follow the conventions stated above.

If you absolutely must change the root folder for some reason. You can use e.g. run Vienna::Application.new('_site') instead of run Vienna.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request