Skip to content

Commit 90c3bcc

Browse files
authored
Update app.py
Updated to use cheroot, following the example here: https://github.com/cherrypy/cheroot/blob/master/cheroot/wsgi.py
1 parent f2245b1 commit 90c3bcc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

AndroLabServer/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import getopt
22
import web
3-
from web.wsgiserver import CherryPyWSGIServer
43
import sys
5-
from flask import Flask, request, request_started
4+
#from web.wsgiserver import CherryPyWSGIServer
65
#from cherrypy import wsgiserver
6+
from cheroot import wsgi # This replaces the 2 above
7+
from flask import Flask, request, request_started
78
from functools import wraps
89
from models import User, Account
910
from database import db_session
@@ -147,7 +148,7 @@ def devlogin():
147148

148149
urls = ("/.*", "app")
149150
apps = web.application(urls, globals())
150-
server = CherryPyWSGIServer(("0.0.0.0", port),app,server_name='localhost')
151+
server = wsgi.Server(("0.0.0.0", port),app,server_name='localhost')
151152
print "The server is hosted on port:",(port)
152153

153154
try:

0 commit comments

Comments
 (0)