Take the 2008 Git User's Survey and help out! [ hide ]

ry / ebb fork watch download tarball
public
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
Search Repo:
Ryan Dahl (author)
Fri Mar 14 04:31:43 -0700 2008
commit  53f3e7f84e2c6571b6c97d6ccab3dfc4902253f6
tree    1387a92ddefcfa91d716e69fe93cb8daadaaead2
parent  85f82048ed23e90fe8209ac83cdf6724da8636e9
ebb / test / echo_server.rb
100644 15 lines (11 sloc) 0.344 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'rubygems'
require 'json'
require File.dirname(__FILE__) + '/../ruby_lib/ebb'
 
 
class EchoApp
  def call(env)
    env['rack.input'] = env['rack.input'].read(1000000)
    env.delete('rack.errors')
    [200, {'Content-Type' => 'text/json'}, env.to_json]
  end
end
 
 
server = Ebb::start_server(EchoApp.new, :port => 4037, :workers => 10)