Created
June 4, 2014 18:21
-
-
Save software-mariodiana/864aabc70e3892eaa17d to your computer and use it in GitHub Desktop.
A hello world example for using Bottle with Rocket.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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