diff --git a/README.md b/README.md
index 1eba7fd..b8844fc 100644
--- a/README.md
+++ b/README.md
@@ -92,10 +92,10 @@ $ pip install -r requirements.txt
4. run dev server:
```bash
-$ python -m app.run
+$ python -m app.run -d
```
-the server will run on localhost:8080. when run for the first time, it will create an admin account and print its credentials to the terminal, so make sure to run this in an interactive session.
+the server will run on localhost:8080 (and will be available on the local network as well; if this is not desired, drop the `-d` flag). when run for the first time, it will create an admin account and print its credentials to the terminal, so make sure to run this in an interactive session.
press Ctrl+C to stop the server.
@@ -110,4 +110,3 @@ when you want to run the server again, make sure to activate the venv first:
$ source .venv/bin/activate
$ python -m app.run
```
-
diff --git a/app/run.py b/app/run.py
index eb66f73..e567306 100644
--- a/app/run.py
+++ b/app/run.py
@@ -1,10 +1,15 @@
from app import create_app
import os
+import sys
app = create_app()
if __name__ == "__main__":
+ if len(sys.argv) > 1 and sys.argv[1] == '-d':
+ hostname = '0.0.0.0'
+ else:
+ hostname = '127.0.0.1'
app.run(
- host = "127.0.0.1",
+ host = hostname,
port = 8080
)