NRuby
18 строк · 272.0 Байт
1require 'rack'
2
3class App
4def self.call(env)
5headers = { 'Content-Type' => 'text/plain' }
6code = 200
7body = 'Hello, world!'
8
9unless env['PATH_INFO'] == '/'
10code = 404
11body = 'Not Found'
12end
13
14[code, headers, [body]]
15end
16end
17
18run App
19