3
votes

I manually created a mongDB and deployed this parse server example example to heroku now I want use Parse dashboard for this using

parse-dashboard --appId yourAppId --masterKey yourMasterKey --serverURL "https://example.com/parse" --appName optionalName

From where can I obtain the parameters mentioned above like appId,masterKey,serverUrl and appName

After running this with default appId, masterKey and appName but heroku serverURL its runs dashboard, but on dashboard page it says "Server not reachable: unable to connect to server"

From where can I obtain the parameters mentioned above like appId,masterKey,serverUrl and appName

Why is the server unreachable??

5
Where did you create MongoDB? Is it on your local machine or on the Heroku? - Nidhin David
@NidhinDavid I created it on mLab - Muhammad Faisal Iqbal
I tried similar steps but actual issue is "from where I 'll get appId and masterKey??? " - Muhammad Faisal Iqbal
Are you migrating an existing app? If not then both of them can be any arbitrary value assigned by you. If you are migrating from existing parse then you can find them inside that parse dashboard - Nidhin David

5 Answers

1
votes

First you must run the parse-server-example by setting appId and masterKey Either you can edit the index.js file(https://github.com/ParsePlatform/parse-server-example/blob/master/index.js) and hard code the value or you can set it by using heroku env variables. read this page: https://devcenter.heroku.com/articles/config-vars

You can set it as

 heroku config:set APP_ID=yourAppId
 heroku config:set MASTER_KEY=yourMasterKey
 heroku config:set MONGODB_URI=yourMongoUriformMlab
 heroku config:set SERVER_URL=https://enigmatic-wave-36871.herokuapp.com/parse

Please refer this for more detailed info: https://devcenter.heroku.com/articles/deploying-a-parse-server-to-heroku

It can be any value that you like.

Next you have edit the parse-dashboard-config.json in 'parse-dashboard' and provide the appId and MasterKey that you gave earlier in the parse-server-example and save it and start it, you can refer this link:http://blog.parse.com/announcements/introducing-the-parse-server-dashboard/

After editing, the parse-dashboard-config.json should contain:

{
  "apps": [
    {
      "serverURL": "https://enigmatic-wave-36871.herokuapp.com/parse",
      "appId": "The appid that you gave for the parse-server-example",
      "masterKey": "The master key that you gave for parse-server-example",
      "appName": "enginamatic-wave anything you like"
    }
  ]
}
2
votes

Try doing this, it worked for me

parse-dashboard --appId yourAppId --masterKey yourMasterKey --serverURL https://example.com/parse --appName optionalName

The key here is that the server URL needs to be taken out of the double quotes.

1
votes

In your Heroku account, go into the app that you are working on. Now, go into Settings and click on reveal config vars. Copy the keys into their respective places in the terminal code. Make sure to put the server irk in quotes as you have in your example. The serverURL should be "yourAppName.heroku.com/parse".

0
votes

It appears that something went wrong when you configured the server. Delete the app from Heroku and follow this tutorial (instead of using Rob's server example, use the Parse server example).

0
votes

you need use https both parse-server and parse-dashboard. such as serverURL:"https://localhost:1337/parse" //your parse-server addr.\n in parse-dashboard serverURL:"https://110.76.187.79:1337/parse" //your parse-dashboard addr