from flask import Flask # 初始化对象 app = Flask(__name__) # 创建函数 @app.route('/moke') def get_res(): res='hello moke' return res if __name__ == '__main__': app.run()