aboutsummaryrefslogtreecommitdiff
path: root/bin/dev-server
blob: 82f8d46efeccc1e890e5b0f7267864ae14ac5193 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
set -euo pipefail

# Serve public

fuser -k 8000/tcp || true
python -m http.server --directory public 8000 &
trap "fuser -k 8000/tcp" EXIT

# Build HTML recipes on changes

watchexec \
  --clear \
  --restart \
  --watch src \
  --watch songs \
  "bin/build"