parse-server
parse-server copied to clipboard
Replace Parse Server custom config logic with library
trafficstars
New Issue Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Issue Description
The custom developed logic to handle the Parse Server config options is complex and difficult to maintain. In context of adopting TypeScript https://github.com/parse-community/parse-server/issues/7334, it would require an enormous effort to rewrite the logic. It is also buggy when it comes to complex option types (array of ...).
The are off-the-shelf libs like convict, which include all of the features that we currently maintain by hand.
Suggested Solution
Replace custom config logic with a library.
Requirements:
- validation
- accept options via env var
- accept options via config file
- allow to set dynamic vars, i.e. a function instead of a var, see https://github.com/parse-community/parse-server/issues/9052
- TS support
- config versioning (optional)
This would close:
- https://github.com/parse-community/parse-server/issues/8202
- https://github.com/parse-community/parse-server/issues/8673
- https://github.com/parse-community/parse-server/issues/8432
- https://github.com/parse-community/parse-server/issues/8300
- https://github.com/parse-community/parse-server/issues/7939
- https://github.com/parse-community/parse-server/issues/7151
- https://github.com/parse-community/parse-server/issues/9125
Related:
- https://github.com/parse-community/parse-server/issues/7069