-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
state:releasedReleased as stable versionReleased as stable versionstate:released-5.x.xReleased as LTS versionReleased as LTS versionstate:released-alphaReleased as alpha versionReleased as alpha versionstate:released-betaReleased as beta versionReleased as beta versiontype:featureNew feature or improvement of existing featureNew feature or improvement of existing feature
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
chillaxdev, Moumouls, okobsamoht and dblythy
Metadata
Metadata
Assignees
Labels
state:releasedReleased as stable versionReleased as stable versionstate:released-5.x.xReleased as LTS versionReleased as LTS versionstate:released-alphaReleased as alpha versionReleased as alpha versionstate:released-betaReleased as beta versionReleased as beta versiontype:featureNew feature or improvement of existing featureNew feature or improvement of existing feature