Skip to content

Instantly share code, notes, and snippets.

@software-mariodiana
Created June 4, 2014 18:21
Show Gist options
  • Save software-mariodiana/864aabc70e3892eaa17d to your computer and use it in GitHub Desktop.
Save software-mariodiana/864aabc70e3892eaa17d to your computer and use it in GitHub Desktop.
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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment