Skip to content
dev.py 435 B
Newer Older
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import os

from module import app

debug = os.environ.get( "DEBUG", False ) in [ "True", "true", "1" ]

if __name__ == "__main__":
    if os.path.isfile( "./cert.pem" ) and os.path.isfile( "./key.pem" ):
        app.run( debug = debug, host = "0.0.0.0", threaded = True, ssl_context = ( "cert.pem", "key.pem" ) )
    else:
        app.run( debug = debug, host = "0.0.0.0", threaded = True )