docker学习仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
321 B

2 years ago
from flask import Flask, render_template
from flask_cors import CORS # need to mention
import json
app = Flask(__name__)
CORS(app)
@app.route('/book')
def json_file():
file = open('./book.json')
json_data = json.load(file)
return json_data
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)