We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74ca40c commit 0ac1e77Copy full SHA for 0ac1e77
app.rb
@@ -1,13 +1,15 @@
1
-require 'sinatra'
+require 'sinatra/base'
2
3
-get '/get' do
4
- 'OK'
5
-end
6
-
7
-post '/post' do
8
- if request.body == "POSTDATA"
+class App < Sinatra::Base
+ get '/get' do
9
'OK'
10
- else
11
- 'FAIL'
+ end
+
+ post '/post' do
+ if request.body == "POSTDATA"
+ 'OK'
+ else
12
+ 'FAIL'
13
14
end
15
config.ru
@@ -1,3 +1,5 @@
+$stdout.sync = $stdin.sync = true
require './app'
run App
0 commit comments