from flask import Flask
from flask import render_template
import json
from flask import jsonify
app = Flask(__name__, static_url_path='')
@app.route('/')
def hello_flask():
return render_template('datastruct_inuse.htm')
@app.route('/query')
def query_json():
json_file = None
with open('location.json') as f:
json_file = json.load(f)
# print(json_file)
# print(type(json_file))
return jsonify(json_file)
if __name__ == '__main__':
app.run(debug=True)
数据结构课设flask服务器
最新推荐文章于 2022-07-06 13:54:47 发布