forked from nyaadevs/nyaa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWSGI.py
More file actions
17 lines (13 loc) · 449 Bytes
/
WSGI.py
File metadata and controls
17 lines (13 loc) · 449 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import gevent.monkey
gevent.monkey.patch_all()
from nyaa import create_app
app = create_app('config')
if app.config['DEBUG']:
from werkzeug.debug import DebuggedApplication
app.wsgi_app = DebuggedApplication(app.wsgi_app, True)
if __name__ == '__main__':
import gevent.pywsgi
gevent_server = gevent.pywsgi.WSGIServer(("localhost", 5000), app.wsgi_app)
gevent_server.serve_forever()