Source

yt.hub / runblanktornado.py

Full commit
import os
#if os.path.isfile("test.db"): os.unlink("test.db")

from ythub.database import init_db, db_session
init_db()
from ythub.models import User

# Now we set up a simple user

#hiro = User(name = "Hiro Protagonist", email = "hiro@blacksun.mv",
#            username = "hiro", password="stupid")
#db_session.add(hiro)
#db_session.commit()
#print User.query.first().api_key
#open("api_key", "w").write(User.query.first().api_key)

from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from ythub import app

http_server = HTTPServer(WSGIContainer(app),
    ssl_options = {
        "certfile": "server.crt",
        "keyfile": "server.key"
        }
    )
http_server.listen(5000)
IOLoop.instance().start()