A tiny CGI site written in POSIX AWK.
It serves three small things:
increment.awk: an embeddable 88x31 increment badge.place.awk: a shared 88x31 pixel board.guestbook.awk: a tiny append-only guestbook.
Linux requires the flock command from util-linux. On macOS, local tests use
the lockf package from pkgsrc instead:
sudo /opt/pkg/bin/pkgin install lockf./serve.shOpen:
http://localhost:8000/
Use another port:
PORT=9000 ./serve.sh./test.shRun the CGI server:
cd /srv/awkward
PORT=9000 ./serve.shCaddy:
awkward.example.com {
reverse_proxy 127.0.0.1:9000
}Runtime data is stored in:
counts/place/guestbook/
These directories should be writable by the user running the CGI server.
The .flock files in them are persistent lock identities, not held locks;
the kernel releases a held lock automatically when its process exits.