This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
from flask import Flask
app = Flask(__name__)
BASE_URL = "http://127.0.0.1:5000/"
BASE_URL_APP = "http://192.168.0.197:5000"
@app.route("/")
def hello_world():
return "<p>Hello, World!</p>"
@app.route("/hello")
def flask_test():
return "test success"
"""
连接步骤:
1、首先打开pycharm的terminal,cd进入本文件的文件夹
2、执行set FLASK_APP=FlaskTest
3、执行flask run --host=0.0.0.0
4、3步骤执行后会出现数行结果,最后会有连接地址,复制浏览器打开即可