make a colab for hosting the back easily
rom1504 opened this issue · comments
Romain Beaumont commented
johnpaulbin commented
Hey, mega b here.
I found a better solution to ngrok, it uses localtunnel.me. It has a much longer session time, and is not limited to 20 requests a minute.
Example code:
!npm install -g localtunnel
from threading import Thread
def app():
!python app.py # MAKE SURE: It is open to the port 8000.
if __name__ == '__main__':
t1 = Thread(target = app)
a = t1.start()
Then another cell with:
!lt --port 8000
Hope this helps.
Romain Beaumont commented
yeah that seems pretty good indeed!
I'll make that colab soon