repo.or.cz
/
ebb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
fixed ebb_rails stopping
[ebb.git]
/
test
/
echo_server.rb
blob
a4c372ca41b87e38311b041ce62a16864e121b36
1
require 'rubygems'
2
require 'json'
3
require File.dirname(__FILE__) + '/../ruby_lib/ebb'
4
5
6
class EchoApp
7
def call(env)
8
env['rack.input'] = env['rack.input'].read(1000000)
9
env.delete('rack.errors')
10
[200, {'Content-Type' => 'text/json'}, env.to_json]
11
end
12
end
13
14
15
server = Ebb::Server.new(EchoApp.new, :port => 4037)
16
server.start