Created
November 17, 2015 06:27
-
-
Save youngsoul/f2bb02be97fb4cb6a47d to your computer and use it in GitHub Desktop.
Example of setting up Bottle on Onion Omega
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
""" | |
vi /etc/opkg.conf | |
— delete line ‘option check_signature 1' | |
opkg update | |
mkdir -p /home/bottle | |
wget --no-check-certificate https://github.com/defnull/bottle/raw/master/bottle.py | |
opkg install python-light | |
opkg install python-email | |
opkg install python-codecs | |
opkg install python-logging | |
opkg install python-openssl | |
""" | |
from bottle import route, run | |
@route('/hello/<username>') | |
def hello(username): | |
return "Hello {0}. Welcome to the Omega World!".format(username) | |
run(host='0.0.0.0', port=8080, debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment