๐Ÿ“ฆ phagenlocher / Light-CMS

๐Ÿ“„ run.py ยท 23 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23#!/usr/bin/python3

#
# This is an example deployment with Tornado. (http://www.tornadoweb.org/)
#
# This script was taken from http://flask.pocoo.org/docs/0.10/deploying/wsgi-standalone/
# and slightly modiefied.
#

import sys
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from main import app

if len(sys.argv) == 1:
	port = 80
else:
	port = sys.argv[1]

http_server = HTTPServer(WSGIContainer(app))
http_server.listen(port)
IOLoop.instance().start()