I am trying to run Bottle on top of Cherrypy's server. I want to get SSL Support.
So far I have tried this:
from bottle import Bottle, route
from cherrypy import wsgiserver
app = Bottle()
@app.route("/")
def index():
return "Hello"
server = wsgiserver.CherryPyWSGIServer(
('0.0.0.0', 443), app)
server.ssl_adapter.private_key = 'server.key'
server.ssl_adapter.certificate = 'server.crt'
server.start()
But the above throws an ArgumentError that I can't set properties on a None object (ssl_adpater). Apparently I need to set the ssl_adapter property to some object that derives from SSLAdapter, but I couldn't find any examples.
I am using Python 2.7 and Cherrypy 3.2.2
Thanks.