邓淳远、崔鹏宇、翁思扬组云计算期末项目
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.

24 lines
743 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. from flask import request, Flask, jsonify
  2. from APP.view.auth import bp_auth
  3. from APP.view.block import bp_block
  4. from APP.view.start import bp_start
  5. from APP.view.collection import bp_collection
  6. from APP.view.database import init_db
  7. from flask_cors import *
  8. class CustomFlask(Flask):
  9. jinja_options = Flask.jinja_options.copy()
  10. jinja_options.update(dict(
  11. variable_start_string='%%', # Default is '{{', I'm changing this because Vue.js uses '{{' / '}}'
  12. variable_end_string='%%',
  13. ))
  14. app = CustomFlask(__name__)
  15. CORS(app, supports_credentials=True)
  16. app.register_blueprint(bp_auth)
  17. app.register_blueprint(bp_start)
  18. app.register_blueprint(bp_block)
  19. app.register_blueprint(bp_collection)
  20. #init_db()
  21. app.run(debug=True)