Sinatraでアプリ構築
http://www.sinatrarb.com/intro-jp.html
アプリ構築
プロジェクト作成
$ mkdir hello-sinatra $ cd hello-sinatra $ bundle init
Gemfile
# A sample Gemfile source "https://rubygems.org" gem "sinatra"
gemをインストール
$ bundle install --path=vendor/bundle
ファイルを作成
$ touch app.rb
require 'sinatra' get '/' do 'Hello Sinatra!' end
サーバ起動
$ bundle exec ruby app.rb