Skip to content

Commit 0ac1e77

Browse files
committed
make it work
1 parent 74ca40c commit 0ac1e77

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

app.rb

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
require 'sinatra'
1+
require 'sinatra/base'
22

3-
get '/get' do
4-
'OK'
5-
end
6-
7-
post '/post' do
8-
if request.body == "POSTDATA"
3+
class App < Sinatra::Base
4+
get '/get' do
95
'OK'
10-
else
11-
'FAIL'
6+
end
7+
8+
post '/post' do
9+
if request.body == "POSTDATA"
10+
'OK'
11+
else
12+
'FAIL'
13+
end
1214
end
1315
end

config.ru

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
$stdout.sync = $stdin.sync = true
2+
13
require './app'
24

35
run App

0 commit comments

Comments
 (0)