diff --git a/app.rb b/app.rb index 254fe3f..a09bf34 100644 --- a/app.rb +++ b/app.rb @@ -4,5 +4,15 @@ class App < Sinatra::Base erb :index end + get '/hello' do + erb :hello + end + get '/goodbye' do + erb :goodbye + end + + get '/date' do + erb :date + end end diff --git a/views/date.erb b/views/date.erb new file mode 100644 index 0000000..f3bf966 --- /dev/null +++ b/views/date.erb @@ -0,0 +1,11 @@ + + + + Date + + +

Today

+ <% date = Date.today.strftime("%A, %B %d, %Y") %> +

<%= "The date is #{date}" %>

+ + diff --git a/views/goodbye.erb b/views/goodbye.erb new file mode 100644 index 0000000..8be2bba --- /dev/null +++ b/views/goodbye.erb @@ -0,0 +1,10 @@ + + + + Goodbye + + + <% name = "Joe" %> +

<%= "Goodbye #{name}" %>

+ + diff --git a/views/hello.erb b/views/hello.erb new file mode 100644 index 0000000..8957865 --- /dev/null +++ b/views/hello.erb @@ -0,0 +1,9 @@ + + + + Hello + + +

Hello World

+ + diff --git a/views/index.erb b/views/index.erb new file mode 100644 index 0000000..fae3ee8 --- /dev/null +++ b/views/index.erb @@ -0,0 +1,9 @@ + + + + Index + + +

Welcome

+ +