cookie-glass-valenced/tools/serve.sh
2026-12-02 03:35:55 -06:00

7 lines
454 B
Shell
Executable file

#!/usr/bin/env bash
# Rebuilds the zip and serves a Valenced plugin repository on the LAN. Add http://<this-pc-ip>:8787 in Valenced.
set -euo pipefail
cd "$(dirname "$0")/.."
tools/package.sh
export PATH="$HOME/.cache/valenced/bun-linux-x64:$PATH"
exec bun node_modules/.bin/valenced-plugin serve --dist dist --host 0.0.0.0 --port "${PORT:-8787}" --base-url "http://${HOST_IP:-$(ip -4 -br addr show eno1 | awk '{print $3}' | cut -d/ -f1)}:${PORT:-8787}"