aboutsummaryrefslogtreecommitdiff
path: root/bin/dev-server
blob: 45a51fc4e4210f38fc2ef168e9edb204937c74bd (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 recettes \
  --watch template.html \
  "bin/build"