don't need config file anymore, just use it for test purposes

Massimo Melina committed Feb 10, 2022 at 10:03 UTC 5828496682ff6aac1447df0f48bdd50279230e1e
5 files changed +5 -2
.gitignore
+2
@@ -4,3 +4,5 @@ dist
4 #produced by running
5 counters.yaml
6 *.log
7 +config.yaml
8 +accounts.yaml
src/config.ts
+1 -1
@@ -93,7 +93,7 @@ export function setConfig(newCfg: Record<string,any>, partial=false) {
93 export const saveConfigAsap = _.debounce(async () => {
94 fs.writeFile(path, yaml.stringify(state))
95 .catch(err => console.error('Failed at saving config file, please ensure it is writable.', String(err)))
96 -})
96 +}, 100)
97
98 // async version of getConfig, allowing you to wait for config to be ready
99 export async function getConfigReady<T>(k: string, definition?: object) {
tests/accounts.yaml renamed
tests/config.yaml renamed
+1 -1
@@ -11,7 +11,7 @@ port: 80 # 0 is a special value that will let the system pick a random availa
11 #private_key: filepath
12 mime:
13 "*.jpg|*.png|*.mp3|*.txt": auto
14 -disable_plugins: [ 'theme-example', 'download-counter^' ]
14 +disable_plugins: [ 'theme-example', 'download-counter' ]
15 plugins_config:
16 middleware-example:
17 message: ciao
todo.md
+1
@@ -1,5 +1,6 @@
1 # To do
2 - password protect admin
3 +- explain fields in admin
4 - allowed referer
5 - admin/plugins
6 - download-counter: expose results on admin