software-mariodiana
6/4/2014 - 6:21 PM

A hello world example for using Bottle with Rocket.

A hello world example for using Bottle with Rocket.

from rocket import Rocket

from bottle import Bottle
from bottle import route


app = Bottle(__name__)
app.debug = True


@app.route('/')
def hello():
    return '<p>Hello, Bottle & Rocket!</p>'
    
def run_server():
    server = Rocket(
        interfaces=('0.0.0.0', 8000), 
        method='wsgi', 
        app_info={'wsgi_app': app})
    
    server.start()
    
    
if __name__ == '__main__':
    run_server()