No description
  • Lua 36.2%
  • Fennel 31.1%
  • TypeScript 28.2%
  • HTML 1.4%
  • Nix 1.3%
  • Other 1.8%
Find a file
2024-03-25 08:48:45 +01:00
client Mystery and vagueness 2024-03-25 08:02:40 +01:00
lua-server server: add fennel as dependency 2024-03-25 08:13:52 +01:00
server Welcome message is not needed 2024-03-21 00:57:54 +01:00
.envrc Initial commit 2024-01-26 15:22:30 +01:00
flake.lock Initial commit 2024-01-26 15:22:30 +01:00
flake.nix Add luarocks and switch to luajit 2024-03-24 11:09:39 +01:00
README.md Add README 2024-03-25 08:48:45 +01:00

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