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.

26 lines
526 B

This file contains ambiguous Unicode characters!

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的terminalcd进入本文件的文件夹
2、执行set FLASK_APP=FlaskTest
3、执行flask run --host=0.0.0.0
4、3步骤执行后会出现数行结果最后会有连接地址复制浏览器打开即可
"""