+17
README.md
+17
README.md
···
36
36
37
37
The slack app can be created from the [`manifest.yaml`](./manifest.yaml) in this repo. It just needs the `emoji:read` and `users:read` scopes.
38
38
39
+
I included a service file in this repo that you can use to run the app. Just copy it to `~/.config/systemd/` and then run `systemctl --user enable cachet` and `systemctl --user start cachet` to start the app.
40
+
41
+
```bash
42
+
cp cachet.service ~/.config/systemd/user/
43
+
systemctl --user enable cachet
44
+
systemctl --user start cachet
45
+
```
46
+
47
+
Now grab a free port from nest (`nest get_port`) and then link your domain to your nest user (`nest caddy add cachet.dunkirk.sh`) (don't for get to make a CNAME on the domain pointing to `kierank.hackclub.app`) and then after editing in a `Caddyfile` entry like the following you should be good to go!
48
+
49
+
```caddy
50
+
http://cachet.dunkirk.sh {
51
+
bind unix/.cachet.dunkirk.sh.webserver.sock|777
52
+
reverse_proxy :38453
53
+
}
54
+
```
55
+
39
56
### Usage
40
57
41
58
The api is pretty simple. You can get a profile picture by calling `GET /profile/:id` where `:id` is the slack user id. You can get an emoji by calling `GET /emoji/:name` where `:name` is the name of the emoji. You can also get a list of all emojis by calling `GET /emojis`. (WIP - subject to rapid change)
+15
cachet.service
+15
cachet.service
···
1
+
[Unit]
2
+
Description=cache for slack profile pictures and emojis
3
+
DefaultDependencies=no
4
+
After=network-online.target
5
+
6
+
[Service]
7
+
Type=exec
8
+
WorkingDirectory=/home/kierank/cachet
9
+
ExecStart=bun run src/index.ts
10
+
TimeoutStartSec=0
11
+
Restart=on-failure
12
+
RestartSec=1s
13
+
14
+
[Install]
15
+
WantedBy=default.target