from os path import dirname from glashammer import make_app run_very_s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
from os.path import dirname
from glashammer import make_app, run_very_simple, Response
def hello_view(req):
return Response('<h1>Hello World</h1>')
def setup(app):
app.add_url('/', endpoint='hello/index', view=hello_view)
from glashammer.bundles.firephp import setup_app
app.add_setup(setup_app)
def create_app():
app = make_app(setup, dirname(__file__))
return app
if __name__ == '__main__':
app = create_app()
run_very_simple(app)