Skip to content

Instantly share code, notes, and snippets.

@youngsoul
Created November 17, 2015 06:27
Show Gist options
  • Save youngsoul/f2bb02be97fb4cb6a47d to your computer and use it in GitHub Desktop.
Save youngsoul/f2bb02be97fb4cb6a47d to your computer and use it in GitHub Desktop.
Example of setting up Bottle on Onion Omega
"""
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