|
|
@ -33,9 +33,9 @@ def eventStream(eventQueue):
|
|
|
|
yield "event:{event}\n{data}\n\n".format(event=eventNode['event'], data=data)
|
|
|
|
yield "event:{event}\n{data}\n\n".format(event=eventNode['event'], data=data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/data/<path:path>')
|
|
|
|
@app.route('/img/<path:path>')
|
|
|
|
def send_data(path):
|
|
|
|
def send_data(path):
|
|
|
|
return send_from_directory('data', path)
|
|
|
|
return send_from_directory('resource/img', path)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/generalTxt')
|
|
|
|
@app.route('/generalTxt')
|
|
|
@ -151,10 +151,10 @@ def send_resource(path):
|
|
|
|
return send_from_directory('resource', path)
|
|
|
|
return send_from_directory('resource', path)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route("/dcard_dev")
|
|
|
|
@app.route('/generaltxt/help')
|
|
|
|
def dcard_dev():
|
|
|
|
def generaltxt_help():
|
|
|
|
return render_template('dcard.html', title='DCard Sentntree 測試版')
|
|
|
|
return render_template('generaltxt_help.html', title="使用說明")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
app.run(debug=False, port=4980, host='0.0.0.0', threaded=False)
|
|
|
|
app.run(debug=True, port=4980, host='0.0.0.0', threaded=False)
|
|
|
|