Newer
Older
#!/usr/bin/python
# -*- coding: UTF-8 -*-
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"
port = os.environ.get( "PORT", 5000 )

Marco De Donno
committed
if ICNML_SSL and os.path.isfile( KEY_FILE ) and os.path.isfile( CERT_FILE ):
http_server = WSGIServer( ( "0.0.0.0", port ), app, keyfile = KEY_FILE, certfile = CERT_FILE, log = logging.getLogger() )
http_server = WSGIServer( ( "0.0.0.0", port ), app, log = logging.getLogger() )