Closed
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
Customization is a key characteristic of Parse Server. There have been scenarios in the past in which developers need to access adapters / controllers of Parse Server, which is done via the server config. The suggested way to access the config is:
const Config = require('../node_modules/parse-server/lib/Config');
That is not a stable reference and may break if server files are refactored.
See:
- "Clean Up Files" Feature #1023 (comment)
- Is there a way to access MongoDB instance in cloud code. #1859 (comment)
Feature / Enhancement Description
Expose the server config via an official method, for example:
const Parse = require('parse/node');
const Config = Parse.config;
// or considering multitenency:
const Config = Parse.getConfig(Parse.applicationId);
Example Use Case
const config = Parse.config;
const url = config.filesController.adapter.getFileLocation(config, filename);
Alternatives / Workarounds
n/a
3rd Party References
n/a