Unfortunately there are still many people who prefer static config
file. As such, schema validate the configurations to ensure that
the failure happens loud and early when the config.js is broken.
Also enforces that the length of secret must be larger than 30 as
the JWT secret can be brute forced locally without interaction with
the server.
This ensures that we always have proper configurations and avoids
unnecessary and bad defensive programming practices.
This allows us to be dependency-free in production.
Caveats:
- NCC can't handle WASM. Thus, we have to remove WASM files inside
argon2-browser before build to force JS.
- Duplicate geoip databases inside dist/data and dist. We have to
remove dist/data after build.