Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse.Config does not work on Parse Server?

I can't seem to find anything official about this: Does Parse.Config work on Parse Server? It used to work on Parse.com but when I try to migrate to Parse.Server, when trying the REST API it seem to fail:

GET http://localhost:1337/parse/config

Passing in my app ID. I read somewhere Config does not work on Parse Server, but wanted to confirm

like image 259
Jiew Meng Avatar asked Jun 20 '26 04:06

Jiew Meng


1 Answers

Although is not officially supported as mentioned on the docs,there is a way to make it work. It is still an experimental implementation though.

As mentioned here & here, you should set the environment variable: PARSE_EXPERIMENTAL_CONFIG_ENABLED=1

Then restart your node server. In case you deployed it on heroku for example you should on cli heroku restart -a <APP_NAME>

If that doesn't work I would suggest to simply add your route with your configuration options on your project's index.js file where express is initialized like so.

var parseConfig = {
  "params": { /*...put your options here*/ }
};

// :one? is for old SDK compatibility while is optional parameter.
app.all('/parse/:one?/config', function (req, res) {
  res.json(parseConfig);
});
like image 63
dimitrisk Avatar answered Jun 23 '26 08:06

dimitrisk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!