タグ

ブックマーク / sinatrarb.com (2)

  • Sinatra: README (Japanese)

    http://localhost:4567 を開きます。 ThinがあればSinatraはこれを利用するので、gem install thinすることをお薦めします。 目次 ルーティング(Routes) Sinatraでは、ルーティングはHTTPメソッドとURLマッチングパターンがペアになっています。 ルーティングはブロックに結び付けられています。 get '/' do .. 何か見せる .. end post '/' do .. 何か生成する .. end put '/' do .. 何か更新する .. end patch '/' do .. 何か修正する .. end delete '/' do .. 何か削除する .. end options '/' do .. 何か満たす .. end link '/' do .. 何かリンクを張る .. end unlink '/' do ..

  • Sinatra: README

    View at: http://localhost:4567 The code you changed will not take effect until you restart the server. Please restart the server every time you change or use a code reloader like rerun or rack-unreloader. It is recommended to also run gem install puma, which Sinatra will pick up if available. Routes In Sinatra, a route is an HTTP method paired with a URL-matching pattern. Each route is associated

  • 1