"借助flask-ngrok轻松实心内网穿透"

Published on Aug. 22, 2023, 12:05 p.m.

flask-ngrok是一个专为flask开发打造的内网穿透插件.

借助它就可以使用colab开发测试web项目了.

pip install flask-ngrok# flask_ngrok_example.pyfrom flask import Flaskfrom flask_ngrok import run_with_ngrokapp = Flask(__name__)run_with_ngrok(app)  # Start ngrok when app is [email protected]("/")def hello():    return "Hello World!"if __name__ == '__main__':    app.run()