Server UWGSI

main
Sebastián Santisi 12 months ago
parent 4e281de747
commit 225f6d6104

@ -3,7 +3,7 @@ import json
app = Flask(__name__)
import xxx
import simulation
@app.route("/", methods=['GET', 'POST'])
def index():
@ -17,7 +17,7 @@ def index():
if len(pos) > 10 or direction not in (0, 225, 270, 315):
return abort(400);
ws, pot = xxx.run(direction, pos);
ws, pot = simulation.run(direction, pos);
return {
'pos': pos,
'ws': ws,

@ -0,0 +1,6 @@
[uwsgi]
module = wsgi:app
http = 127.0.0.1:1234
master = true
processes = 1

@ -0,0 +1,4 @@
from server import app
if __name__ == '__main__':
app.run(host='127.0.0.1', port=1234)
Loading…
Cancel
Save