irongit

Git hosting and a container registry in one Rust binary (axum + Astro)

irongit/dev.sh
14 lines570 BBourne Again Shell (bash)
1#!/bin/sh
2# Development server on PORT (7878). Installs frontend dependencies if needed
3# (rust-embed needs frontend/dist to exist before the server compiles), then
4# restarts the server on Rust or SQL changes. The server itself rebuilds the
5# frontend and reloads open browsers.
6set -e
7
8cd "$(dirname "$0")"
9
10[ -f .env ] || { echo "missing .env (see secrets.md)"; exit 1; }
11[ -d frontend/node_modules ] || (cd frontend && bun install)
12[ -d frontend/dist ] || (cd frontend && bun run build)
13
14exec watchexec -r -e rs,toml,sql -w backend -w shared -- cargo run -p irongit