working branch #1
Binary file not shown.
@@ -1,6 +1,7 @@
|
|||||||
from flask import Flask, render_template, make_response, json
|
from flask import Flask, render_template, make_response, json
|
||||||
import app_obd, app_car, app_account, time
|
import app_obd, app_car, app_account, time
|
||||||
from app_events import socketio
|
from app_events import socketio
|
||||||
|
from gevent.pywsgi import WSGIServer
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
socketio.init_app(app)
|
socketio.init_app(app)
|
||||||
@@ -25,3 +26,12 @@ def data():
|
|||||||
response = make_response(json.dumps(data))
|
response = make_response(json.dumps(data))
|
||||||
response.content_type = 'application/json'
|
response.content_type = 'application/json'
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
# Debug/Development
|
||||||
|
# app.run(debug=True, host="0.0.0.0", port="5000")
|
||||||
|
# Production
|
||||||
|
http_server = WSGIServer(('', 5000), app)
|
||||||
|
print("server on :5000")
|
||||||
|
http_server.serve_forever()
|
||||||
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
# yaris-obd #
|
# yaris-obd #
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
python3 app.py
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# yaris-obd #
|
||||||
|
|
||||||
|

|
||||||
Reference in New Issue
Block a user