Skip to content

Commit e3e159f

Browse files
authored
Update quickstart
1 parent f80259a commit e3e159f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,20 @@ pip install ngrok
3838
```python
3939
# import ngrok python sdk
4040
import ngrok
41+
import time
4142

4243
# Establish connectivity
4344
listener = ngrok.forward(9000, authtoken_from_env=True)
4445

4546
# Output ngrok url to console
4647
print(f"Ingress established at {listener.url()}")
48+
49+
# Keep the listener alive
50+
try:
51+
while True:
52+
time.sleep(1)
53+
except KeyboardInterrupt:
54+
print("Closing listener")
4755
```
4856

4957
That's it! Your application should now be available through the url output in your terminal.

0 commit comments

Comments
 (0)