refactor: use env-overridable ports via tmux-dev.env

This commit is contained in:
Florian Schroedl
2026-04-28 16:46:26 +02:00
parent b43b8cbee1
commit 6b7ad97de4
+7 -6
View File
@@ -1,12 +1,13 @@
{:deps {tmux-dev/tmux-dev {:git/url "https://gitea.florianschroedl.com/floscr/tmux-dev"
:git/sha "3d9e53bc38b818bfcee312065ded0aef83bdecf4"}}
:tasks
{:requires ([tmux-dev.core :as td])
:init (def dev-config {:session "atomsync-dev"
:windows [["server" "bb server"]
["cljs" "bb cljs:watch"]]
:print ["App: http://localhost:8090"
"Server: http://localhost:8090/sync"]})
{:requires ([tmux-dev.core :as td] [tmux-dev.env :as env])
:init (do (def port (env/number "PORT" 8090))
(def dev-config {:session "atomsync-dev"
:windows [["server" (str "bb server --port " port)]
["cljs" "bb cljs:watch"]]
:print [(str "App: http://localhost:" port)
(str "Server: http://localhost:" port "/sync")]}))
server {:doc "Start the Atomsync sync server (serves example app)"
:task (shell "clj" "-M:server" "--static-dir" "example/todomvc")}