blob: d1a07a60c5d808fa650a7ce5a1817db9f69dc31a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# clog
An attempt to implement a blog in C, using the [kore.io](https://kore.io) framework.
## Running
```sh
make fetch-dependencies
docker compose up
```
## Notes
To run locally modify `conf/clog.conf`, comment out `root /var/chroot/` and uncomment
the `skip chroot` section:
```conf
privsep worker {
runas clog
# root /var/chroot/
skip chroot
}
```
Maybe disable `seccomp_tracing` in `conf/clog.conf` if running into problems:
```conf
seccomp_tracing no
# seccomp_tracing yes
```
## Bootstrapping the database
Use `psql` and load `db/db.sql` for models,
`db/data.sql` for some example data.
## TODO
1. ~Only do HTTP stuff at the edge.~
2. ~`PUT`~/`PATCH`? entries.
3. pagination
4. HTML form for edits
5. Make <h1> first class markdown citizen
6. ~Remove JSON API?~
7. ~use sha256 hash to check kore blob~
8. Have `tests.py` load and drop database.
9. ~Refactor URLs and HTTP calls in tests `tests.py` to reduce copy-pasta~
10. Get rid of `requests` dependency in `tests.py`
11. Fix `PATCH` redirects?
## But using C in 2023 is dangerous?
* https://chromium.googlesource.com/chromium/src/+/master/docs/security/rule-of-2.md
* https://verdagon.dev/blog/when-to-use-memory-safe-part-1
|