Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWKward

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.

Run

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.sh

Open:

http://localhost:8000/

Use another port:

PORT=9000 ./serve.sh

Test

./test.sh

Deploy Behind Caddy

Run the CGI server:

cd /srv/awkward
PORT=9000 ./serve.sh

Caddy:

awkward.example.com {
	reverse_proxy 127.0.0.1:9000
}

Data

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.

About

Don't smoke AWK, kids.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages