Newer
Older
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from gevent.pywsgi import WSGIServer
from module import app
ICNML_SSL = os.environ.get( "ICNML_SSL", True )
ICNML_SSL = ICNML_SSL in [ "t", "T", True, "1" ]

Marco De Donno
committed
KEY_FILE = "/tmp/key.pem"
CERT_FILE = "/tmp/cert.pem"
if ICNML_SSL and os.path.isfile( KEY_FILE ) and os.path.isfile( CERT_FILE ):
http_server = WSGIServer( ( "", 5000 ), app, keyfile = KEY_FILE, certfile = CERT_FILE )
http_server = WSGIServer( ( "", 5000 ), app )