如何在 Heroku 上访问 Parse Dashboard

How to access Parse Dashboard on Heroku

我正在尝试为个人爱好项目设置解析 - 我决定将其部署在 Heroku 上。

我遵循了本自述文件中的步骤:https://github.com/ParsePlatform/parse-server-example

我点击了 DEPLOY to HEROKU 按钮。一切顺利。但是我无法访问 Parse Dashboard.

我的配置(它是一个测试应用程序 - 我将删除它并重新部署,因此我共享凭据):

APP_NAME : test1000000

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

APP_ID : test1000000

MATER_KEY : myMasterKey

我还需要做些什么吗?

当我尝试在我的浏览器上访问以下链接时,我看到以下内容:

  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!

我是不是漏掉了什么?

是的,你做到了。检查 documentation。 如果您真的希望它们在同一个应用程序中,请查看文档的这一部分

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

但是将仪表板作为另一个应用程序会更安全(它在 heroku 上是免费的,因为免费计划对它来说绰绰有余),甚至可以将其部署在您的本地主机。另外,我的应用程序上没有仪表板,我只是直接在 mongolab 仪表板中做我的事情。