Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Functions in Google Colab #111

Closed
dirkbosman opened this issue Feb 15, 2021 · 1 comment
Closed

Testing Functions in Google Colab #111

dirkbosman opened this issue Feb 15, 2021 · 1 comment

Comments

@dirkbosman
Copy link

Use Case:

  • Test functions in a Google Colab (within Google Drive).
  • Include flask-ngrok in the requirement.txt already.

This will allow the Flask app (which is running on localhost) to be available temporarily over the Internet via the excellent ngrok tool, when one runs main.py thereafter:

from flask import Flask
from flask import request
from flask_ngrok import run_with_ngrok
app = Flask(__name__)
run_with_ngrok(app)
@app.route("/")
def root():
    url = request.method
    return "Hello world!"
app.run()

Access function(s) by navigating to the following urls:

 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Running on http://<dynamic-value>.ngrok.io
 * Traffic stats available on http://127.0.0.1:4040
@di
Copy link
Member

di commented Feb 18, 2021

Closing per #110 (comment) but thanks for raising the issue!

@di di closed this as completed Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants