diff --git a/hoge.rb b/hoge.rb new file mode 100755 index 0000000..d26867a --- /dev/null +++ b/hoge.rb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +# -*- coding: utf-8 -*- +require 'sinatra' +require 'sinatra/reloader' + +get '/' do + @title = "My First Script of Sinatra" + erb :index +end + +get '/hoge/:name' do + "HOGE2!"+params[:name] +end + diff --git a/public/main.css b/public/main.css new file mode 100644 index 0000000..cf8513e --- /dev/null +++ b/public/main.css @@ -0,0 +1 @@ +body {background: #ee9;} diff --git a/views/index.erb b/views/index.erb new file mode 100644 index 0000000..32a8cc0 --- /dev/null +++ b/views/index.erb @@ -0,0 +1,11 @@ + + +<%= @title %> + + + + +

ああああ

+

+ +