You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if name == 'main':
# Update the ngrok connect line with your custom domain
public_url = ngrok.connect(addr="80", options={"subdomain": "xxxxx-xxxx-dove"})
print(f'Running server at {public_url}')
app.run(port=80)
This is just for an example tp make sure instead of localhostL5000 the subdomain is started from the static url
Describe Alternative Solutions/Workarounds
i am suggesting if there is a way to get a free static url from ngrok which can help run the flask apploication and then use that same again and again .
The text was updated successfully, but these errors were encountered:
if name == 'main':
# Update the ngrok connect line with your custom domain
public_url = ngrok.connect(name = "some-edge-tunnel")
print(f'Running server at {public_url}')
app.run(port=80)
When you think you're experiencing an error, provide the accompanying output, otherwise those trying to help you have nothing to go off of.
Format code properly, otherwise those trying to help you can't simply copy/paste to reproduce your experience with the code.
For the context of this library, provide the comparable ngrok command that shows what you want to do / why it should work in pyngrok, otherwise with so little other information, those trying to help you can't understand where you're trying to get to.
Ask questions in the relevant context, which continues to be Stack Overflow unless a bug or missing functionality is actually shown in the description provided (which is not the case here).
Repository owner
locked as off-topic and limited conversation to collaborators
Jan 26, 2024
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Acknowledgements
Describe the Feature
how to run flask from static url provided by ngrok for free? i always get CORS error when a random url is generated/
i am still not able to run it
!pip install Flask
!pip install pyngrok
!ngrok config add-authtoken xxxxxxxxxxxxxxxxxxxxxxxxx
from flask import Flask, request
from pyngrok import ngrok
app = Flask(name)
@app.route('/', methods=['GET', 'POST'])
def home():
if request.method == 'POST':
return 'POST request received!'
else:
return 'GET request received!'
if name == 'main':
# Update the ngrok connect line with your custom domain
public_url = ngrok.connect(addr="80", options={"subdomain": "xxxxx-xxxx-dove"})
print(f'Running server at {public_url}')
app.run(port=80)
This is just for an example tp make sure instead of localhostL5000 the subdomain is started from the static url
Describe Alternative Solutions/Workarounds
i am suggesting if there is a way to get a free static url from ngrok which can help run the flask apploication and then use that same again and again .
The text was updated successfully, but these errors were encountered: