From 10d96a2283c28be8c1119a21f0d9cec6b3fad778 Mon Sep 17 00:00:00 2001 From: arne Date: Mon, 25 Mar 2024 08:40:56 +0100 Subject: [PATCH] Add README --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d07d2a4 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +# pond + +A small experiment and a place to gather around for [compost.party](https://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: + +```bash +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 + +```bash +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`: + +```nginx +# 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](https://direnv.net/) 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: + +```bash +cd lua-server +fennel server.fnl 5174 +``` + +And the client like so: + +```bash +cd client +deno task dev +```