backend api
This commit is contained in:
9
backend-python/utils/ngrok.py
Normal file
9
backend-python/utils/ngrok.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import os
|
||||
|
||||
|
||||
def ngrok_connect():
|
||||
from pyngrok import ngrok, conf
|
||||
conf.set_default(conf.PyngrokConfig(ngrok_path="./ngrok"))
|
||||
ngrok.set_auth_token(os.environ["ngrok_token"])
|
||||
http_tunnel = ngrok.connect(8000)
|
||||
print(http_tunnel.public_url)
|
||||
Reference in New Issue
Block a user