Last Updated: February 25, 2016
· supherman

Simple rack app to serve static content

  1. Create a Gemfile

    touch Gemfile
  2. Add the rack gem to the gemfile

    source ''
    gem 'rack'
  3. Run bundle install

    bundle install
  4. Create a file with the following code

    map "/" do
      use Rack::Static, urls: [""],
                        root: File.expand_path('./'),
                        index: 'index.html'
      run lambda {}
  5. Create an index.html file

    touch index.html
  6. Run the server and open your browser at

    bundle exec rackup