Skip to content

Expose Parse Server config in Cloud Code #7869

Closed
@mtrezza

Description

@mtrezza

New Feature / Enhancement Checklist

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:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions