How to deploy parse dashboard to heroku

后端 未结 3 902
眼角桃花
眼角桃花 2020-12-14 11:20

I have deployed the parse server on heroku (https://github.com/ParsePlatform/parse-server) but can\'t find anything to deploy the parse dashboard on heroku. Any reference is

3条回答
  •  抹茶落季
    2020-12-14 11:43

    I just managed to get this working. Here are the steps I took.

    1. Clone parse-dashboard to your local machine.
    2. Run npm install inside that directory.
    3. Update package.json and change the "start" script to:

      "start": "node ./Parse-Dashboard/index.js --config ./Parse-Dashboard     /parse-dashboard-config.json --allowInsecureHTTP=1" 
      

      (Thanks to nsarafa's answer above for that).

    4. Edit your .gitignore file and remove the following three lines:

      bundles/Parse-Dashboard/public/bundles/Parse-Dashboard/parsedashboard-config.json
      
    5. Edit your config file in Parse-Dashboard/parse-dashboard-config.json, making sure URLs and keys are correct. Here is an example :

      {
      "apps": [
        {
          "serverURL": "https://dhowung-fjird-52012.herokuapp.com/parse",
          "appId": "myAppId",
          "masterKey": "myMasterKey",
          "appName": "dhowung-fjird-40722"
        }
       ],
      "users": [
        {
         "user":"myUserName",
         "pass":"Str0ng_?Passw0rd"
        }
       ]
      }
      
    6. Remove the cache from your heroku parse server app :

       heroku config:set NODE_MODULES_CACHE=false --app yourHerokuParseServerApp 
      

      if we follow the example above

       yourHerokuParseServerApp = dhowung-fjird-40722 
      

      (Again, thanks to nsarafa).

    7. Add, commit and push your changes.

    8. Deploy to Heroku again using their CLI or the dashboard.

    Step 4 was the key for me because I wasn't committing my config file, and it took me a while to realise.

    Also, as stated above, make sure you have user logins and passwords in your config file, following the parse-dashboard docs:

    PS: on your heroku parse server make sure your SERVER_URL looks like this https://yourHerokuParseServerAppName.herokuapp.com/parse

提交回复
热议问题