fix: outdated documentation
Massimo Melina committed
Dec 16, 2022 at 10:34 UTC
5bf1237aa52c90ba70deba67fe7fd7e1bd7d7513
2 files changed
+19
-17
README.md
+3
-1
@@ -98,7 +98,9 @@ If you have access to HFS' console, you can enter commands. Start with `help` to
98
## Passing parameters
99
100
Any value you see in the config file with name *X* can be passed at command line in the form `--X <new_value>`,
101
-or you can enter console command `config X <new_value>`.
101
+or you can enter console command `config X <new_value>`.
102
+
103
+Find a complete list [at this link](dev.md#config).
104
105
## License
106
dev.md
+16
-16
@@ -1,6 +1,6 @@
1
-# For developers
1
+This file is mostly aimed to developers.
2
3
-## Building instructions
3
+# Building instructions
4
5
0. Install [Node.js](https://nodejs.org/) 16+
6
1. Install Typescript: launch `npm -g i typescript`
@@ -10,7 +10,7 @@ You'll see some warnings about vulnerabilities. Fear not, for those are in the d
10
If you want to be assured, run `npm audit --production` that will exclude dev stuff, and you should see something
11
more reassuring, like "found 0 vulnerabilities", hopefully.
12
13
-## Dev environment
13
+# Dev environment
14
15
0. `npm install`
16
1. `npm run watch-server-proxied` and leave it running. It will serve server stuff plus will proxy frontend and admin files.
@@ -20,7 +20,7 @@ more reassuring, like "found 0 vulnerabilities", hopefully.
20
If you don't want this proxying version, you can use `npm run watch-server` but after both frontend and admin have
21
been built, so their files are available in `dist` folder.
22
23
-## Tests
23
+# Tests
24
25
To run tests
26
- `npm run build-all`
@@ -29,28 +29,30 @@ To run tests
29
30
Alternatively you can run a development server, just be sure to load config from `tests` folder.
31
32
-## Known problems
32
+# Known problems
33
- vite's proxying server (but also CRA's) doesn't play nicely with SSE, leaving sockets open
34
- vite's building of react-projects (frontend & admin) produce non-working apps
35
- console shows exceptions on any hook invocation
36
- the problem seems to be related to libs being built with a separate instance of react
37
38
-## Guidelines
38
+# Guidelines
39
40
- For strings, I'm trying to use double-quotes or backticks for text that's read by the user, and single-quotes elsewhere.
41
- All objects that go in yaml should use snake_case.
42
- Reason: we want something that is both easy for the user and maps directly in our code.
43
Spaces and kebab-case don't play well with javascript and camel is less readable for the user.
44
45
-## Project design
45
+# Project design
46
47
- At the moment the admin interface was designed to be completely separated from the "user" frontend
48
- to keep the latter smaller and to allow alternative frontends creation without having to deal with the complexity of the admin interface.
48
+ to keep the latter smaller and to allow alternative frontends creation without having to deal with
49
+ the complexity of the admin interface.
50
51
Of course this comes with a price to pay on the programmer's side, more work to do.
52
52
-## File formats
53
+# File formats
54
55
+## Config
56
General configuration is read by default from file `config.yaml`.
57
When not specified, default values will be used.
58
Supported entries are:
@@ -60,7 +62,7 @@ Supported entries are:
62
- `log_rotation` frequency of log rotation. Accepted values are `daily`, `weekly`, `monthly`, or empty string to disable. Default is `weekly`.
63
- `error_log` path of the log file for errors. Default is `error.log`.
64
- `errors_in_main_log` if you want to use a single file for both kind of entries. Default is false.
63
-- `accounts` path of the accounts file. Default is `accounts.yaml`.
65
+- `accounts` list of accounts. For details see the dedicated following section.
66
- `mime` command what mime-type to be returned with some files.
67
E.g.: `"*.jpg": image/jpeg`
68
You can specify multiple entries, or separate multiple file masks with a p|pe.
@@ -115,7 +117,7 @@ Valid keys in a node are:
117
mime: auto
118
```
119
118
-## Accounts
120
+### Accounts
121
122
All accounts go under `accounts:` key, as a dictionary where the key is the username.
123
E.g.
@@ -134,11 +136,9 @@ As soon as the config is read HFS will encrypt passwords (if necessary) in a non
136
As you can see in the example, `group1` has no password. This implies that you cannot log in as `group1`, but still `group1` exists and its purpose is to
137
gather multiple accounts and refer to them collectively as `group1`, so you can quickly share powers among several accounts.
138
137
-## Account options
138
-
139
-Other options you can define as properties of an account:
139
+For each account entries, this is the list of properties you can have:
140
141
- `ignore_limits` to ignore speed limits. Default is `false`.
142
- `redirect` provide a URL if you want the user to be redirected upon login. Default is none.
143
-- `admin` set `true` if you want to let this account log in to the Admin interface.
144
-- `belongs` an array of usernames of other accounts from which to inherit their permissions.
143
+- `admin` set `true` if you want to let this account log in to the Admin interface. Default is `false`.
144
+- `belongs` an array of usernames of other accounts from which to inherit their permissions. Default is none.