GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

ry / ebb fork watch download tarball
public
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
Ryan Dahl (author)
Tue Mar 04 04:29:06 -0800 2008
commit  38aebaab6cc2ec4144c080a94abfab2cdfd71ade
tree    52942b4a34997b675cd553a1d97e917fdf0ca2a1
parent  eb823db6bb07b9c2f411f0aa62b923d3f8198838
ebb / test / echo_server.rb
100644 17 lines (12 sloc) 0.339 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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::Server.new(EchoApp.new, :port => 4037)
server.start