aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkj_sh6042026-04-03 02:49:49 -0400
committerkj_sh6042026-04-03 02:49:49 -0400
commit9134a3bc588dabe5e8ff010fa2e16f65034ae3a7 (patch)
tree639808274d95a2ffa93b3066c1d26d2cbfcdde05
parent97d55ccdc97ef7b0cc28ded5ebbb46c1879291ce (diff)
feat: README
refactor: change default port
-rw-r--r--README27
-rw-r--r--shim_app.py2
2 files changed, 28 insertions, 1 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..f38a8d1
--- /dev/null
+++ b/README
@@ -0,0 +1,27 @@
+shim
+----
+
+small static site host for archive uploads.
+
+
+what it does
+- users upload one archive, app publishes it under a slug
+- public routes: /s/<slug>/... and /_site/<slug>/...
+
+quick start (assumes POSIX)
+- python3 -m venv .venv
+- source .venv/bin/activate
+- pip install -r requirements.txt
+- python3 server.py
+- open http://127.0.0.1:8585/app
+
+config
+- SHIM_APP_NAME: ui/app name (default: shim)
+- SHIM_BIND: bind address (default: 0.0.0.0)
+- SHIM_PORT: port (default: 8585)
+- SHIM_MOJICRYPT_BIN: mojicrypt path (default: ./vendor/mojicrypt)
+- SHIM_COOKIE_SECURE: auto|true|false (default: auto)
+
+data paths
+- db: data/shim.db
+- site files: data/sites/
diff --git a/shim_app.py b/shim_app.py
index 4cc3dec..fae166f 100644
--- a/shim_app.py
+++ b/shim_app.py
@@ -693,7 +693,7 @@ def create_app(base_dir: Optional[Path] = None) -> Flask:
sites_dir=sites_dir,
mojicrypt_bin=mojicrypt_bin,
bind=os.getenv("SHIM_BIND", "0.0.0.0"),
- port=int(os.getenv("SHIM_PORT", "6767")),
+ port=int(os.getenv("SHIM_PORT", "8585")),
)
cfg.db_path.parent.mkdir(parents=True, exist_ok=True)