Add README
This commit is contained in:
parent
476e0b41d3
commit
10d96a2283
1 changed files with 66 additions and 0 deletions
66
README.md
Normal file
66
README.md
Normal file
|
|
@ -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
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue