@@ -10,4 +10,8 @@ if [[ ! $port =~ ^[0-9]+$ ]] || (( port < 1 || port > 65535 )); then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [[ ! -f resources/public/js/main.js ]]; then
|
||||
echo "note: the UI isn't built, so / will show a placeholder. Run script/ui-build first." >&2
|
||||
fi
|
||||
|
||||
PORT=$port exec clojure -X:run
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Compile the re-frame UI (ui/) to resources/public/js, which the server serves at /js.
|
||||
# Needs Node and a JDK. Run this before script/server; restart isn't required afterwards.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/../ui"
|
||||
|
||||
[[ -d node_modules ]] || npm ci
|
||||
exec npx shadow-cljs release app
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Rebuild the UI on every change (hot reload, also serves the shadow-cljs dashboard on :9630).
|
||||
# The output lands in resources/public/js, so run script/server alongside and refresh the page.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/../ui"
|
||||
|
||||
[[ -d node_modules ]] || npm ci
|
||||
exec npx shadow-cljs watch app
|
||||
Reference in New Issue
Block a user