3

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??

Nidhin David
  • 2,426
  • 3
  • 31
  • 45
Muhammad Faisal Iqbal
  • 1,796
  • 2
  • 20
  • 43

5 Answers5

2

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.

Cullub
  • 2,901
  • 3
  • 30
  • 47
  • 1
    Initally I also faced the same problem but when I tried entering the url without double quotation mark it connected to my parse dashboard – Durgaprasad Nagarkatte Feb 07 '17 at 09:23
  • Awesome! I went ahead and edited that into your answer for clarity. Go ahead and double check to make sure that I got it right. – Cullub Feb 07 '17 at 12:09
1

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"
    }
  ]
}
Nidhin David
  • 2,426
  • 3
  • 31
  • 45
1

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".

Dan Levy
  • 3,931
  • 4
  • 28
  • 48
0

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).

Dan Levy
  • 3,931
  • 4
  • 28
  • 48
  • 1
    He wants to connect parse-dashboard with his parse-server-example. The video is teaching how to create a parse app using heroku dashboard and connect an iOS app. Though out of scope, its useful. – Nidhin David Apr 13 '16 at 12:40
  • I was telling him to redo the process because none of the config vars were showing like it should. – Dan Levy Apr 13 '16 at 14:14
0

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