ry / ebb fork watch download tarball
public
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
ryah (author)
Mon Apr 07 16:04:40 -0700 2008
commit  38185f36847ca1315f9241302d6bab7f2f7b1495
tree    0f45e4e6a17cb3e3ee3ac1d4c1cb63199db2d145
parent  8d410a265216bc390fe079ef5655ec33d7970d56
ebb / test / test.py
100644 13 lines (11 sloc) 0.404 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
import sys
sys.path.append('/Users/ry/projects/ebb/build/lib.macosx-10.3-ppc-2.5')
import ebb
# os.path.abspath(__file__)
 
def simple_app(environ):
  """Simplest possible application object"""
  status = '200 OK'
  headers = [('Content-type','text/plain')]
  body = ["Hello world!\n", "Something else!", "blllllaaaaaaaah\n"]
  return([status, headers, body])
 
ebb.start_server(simple_app, {'port': 4001})