Skip to content

Commit 32afff5

Browse files
authored
Merge pull request #127 from ngrok/jen/update-quickstart
Update quickstart
2 parents f80259a + e3e159f commit 32afff5

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)