How to access Parse Dashboard on Heroku

▼魔方 西西 提交于 2020-01-05 04:26:33

问题


I am trying to setup parse for a personal hobby project - I have decided to have it deployed on Heroku.

I followed the steps on this readme : https://github.com/ParsePlatform/parse-server-example

I clicked on the DEPLOY to HEROKU button. Everything went fine. BUT I am NOT able to access the Parse Dashboard.

My configurations (its a test app - I will delete this & re-deploy, hence I am sharing the credentials) :

APP_NAME : test1000000

SERVER_URL : http://test1000000.herokuapp.com/parse

APP_ID : test1000000

MATER_KEY : myMasterKey

Is there something more I have to do?

When I try to access the below links on my browser, I see the following :

  1. http://test1000000.herokuapp.com/parse

    => Cannot GET /parse

  2. http://test1000000.herokuapp.com/apps

    => Cannot GET /apps

  3. http://test1000000.herokuapp.com/

    => I dream of being a website. Please star the parse-server repo on GitHub!

Am I missing something ?


回答1:


Yes you did. Check the documentation. If you really want them in the same application, look at this part of docs

If you want to run both Parse Server and Parse Dashboard on the same server/port, you can run them both as express middleware:

var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var ParseDashboard = require('parse-dashboard');

var allowInsecureHTTP = false

var api = new ParseServer({
    // Parse Server settings
});

var dashboard = new ParseDashboard({
    // Parse Dashboard settings
}, allowInsecureHTTP);

var app = express();

// make the Parse Server available at /parse
app.use('/parse', api);

// make the Parse Dashboard available at /dashboard
app.use('/dashboard', dashboard);

var httpServer = require('http').createServer(app);
httpServer.listen(4040);

But it's much more safe to have the dashboard as another app(it's free on heroku, because free plan is more than enough for it), or even deploy it on your localhost. Also I don't have the dashboard on my app, I just doing my stuff directly in mongolab dashboard.



来源:https://stackoverflow.com/questions/39157486/how-to-access-parse-dashboard-on-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!