Sinatra Applications

Sinatra is a micro-framework for creating web applications. This tutorial explains how to set up a Sinatra application on your Ruby Simple Hosting instance.

# Gemfile
source 'https://rubygems.org'

gem 'rack'
gem 'sinatra'
# config.ru
require './app'
run Sinatra::Application
# app.rb
require 'sinatra'

get '/' do
  "Hello from Sinatra"
end
$ bundle install

You can then add these files to your git tree and deploy it on your instance by following these instructions.

Last modified: 06/02/2014 at 18:19 by AJ B. (Gandi)