Can I create a config file for Parse Server?

1.3k Views Asked by At

I'm quite new to Parse Server, I wonder if I could create a config file for the Parse Server like the way I did in the Parse Dashboard. With the Parse Dashboard, I create a file named parse-server-config.json with this format:

{
  "apps": [
    {
      "serverURL": "http://10.30.176.147:1337/parse",
      "appId": "myFirstApp",
      "masterKey": "myMasterKey",
      "databaseURI": "mongodb://mongo/team" 
    }
  ]
}

And start the dashboard using parse-server --config parse-server-config.json, but I couldn;t do that with the Parse Server, I have to use this command parse-server --appId myFirstApp --masterKey myMasterKey --databaseURI mongodb://localhost:27017/team?readPreference=primary&appname=MongoDB%20Compass&ssl=false --mountGraphQL --mountPlayground to start the Parse server.

1

There are 1 best solutions below

1
Davi Macêdo On BEST ANSWER

Yes. You need to use the following command:

parse-server path/to/config.json

Your config.json should look like this:

{
  "appId": "APPLICATION_ID",
  "masterKey": "MASTER_KEY",
  "databaseURI": "mongodb://localhost/test"
}

You can see all configuration options in the following link:

http://parseplatform.org/parse-server/api/master/ParseServerOptions.html