pond/README.md
2024-03-25 08:48:45 +01:00

1.6 KiB

pond

A small experiment and a place to gather around for compost.party.

Acknowledgements

This repository contains a list of bird names. It's coming from the Wikipedia and was generated like this:

curl https://en.wikipedia.org/wiki/List_of_birds_by_common_name | pup -p '#bodyContent li a[href*=wiki] text{}' | head -n-8

Running this

… somewhere else

Build the client files:

cd client
deno task build
rsync -srvP dist/ compost.party:/var/www/pond.compost.party/html

Install the server's dependencies; fennel will have to be fetched manually because it's not on luarocks

cd lua-server
luarocks make
fennel server.fnl 12345

The client will try to connect to the server on /server, so you need to configure a proxy. This one is used for pond.compost.party:

# site config for pond.compost.party
server {
	server_name pond.compost.party;
	root /var/www/pond.compost.party/html;

	location /server {
            proxy_pass http://localhost:12345;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
	}
}

… locally to experiment and change it

Dependencies are described in the flake.nix file. If you use direnv things should be set up for you as soon as you cd ito this folder. If not, use nix develop . to manually start a shell.

Start the server like so:

cd lua-server
fennel server.fnl 5174

And the client like so:

cd client
deno task dev