blob: 1ceb1b2d029eaa6c818cad03e81a3b8ba8f27d69 [file] [log] [blame]
#!/usr/bin/env python
from panoramix import app, config
from subprocess import Popen
if __name__ == "__main__":
if config.DEBUG:
app.run(
host='0.0.0.0',
port=int(config.PANORAMIX_WEBSERVER_PORT),
debug=True)
else:
cmd = (
"gunicorn "
"-w 8 "
"-b 0.0.0.0:{config.PANORAMIX_WEBSERVER_PORT} "
"panoramix:app").format(**locals())
print("Starting server with command: " + cmd)
Popen(cmd, shell=True).wait()