Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate

Commit 42108e9bda76ff89151feb036bc93f22417f5b17

Switch server to gevent
app/app.py
(5 / 2)
  
3333
3434""" Initialization of local app """
3535app = Flask(__name__)
36app.debug = True
3736app.secret_key="ilovesugar"
3837babel = Babel(app)
3938
252252if __name__=="__main__":
253253 import sugar_network_server as server
254254 import restful_document
255 from gevent.wsgi import WSGIServer
255256
256257 server.debug.value = 3
257258 server.data_root.value = 'tmp/db'
276276 except IndexError:
277277 port=5000
278278
279 app.run(host=host, port=port)
279 http_server = WSGIServer((host, port), app)
280 http_server.serve_forever()
281 #app.debug = True
282 #app.run(host=host, port=port)
  
2424import flask
2525import sugar_network as client
2626from sugar_network.util import enforce
27from gevent.wsgi import WSGIServer
2728
2829try:
2930 from mejorar_sistema.app import app
4343
4444
4545def cmd_start():
46 app.run(host=host.value, port=port.value)
47
46 http_server = WSGIServer((host, port), app)
47 http_server.serve_forever()
4848
4949def cmd_config():
5050 print '\n'.join(client.util.Option.export())