如何在Heroku上访问Parse Dashboard [英] How to access Parse Dashboard on Heroku

查看:90
本文介绍了如何在Heroku上访问Parse Dashboard的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

我按照此自述文件中的步骤操作: https://github.com/ParsePlatform/parse-服务器示例

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

我点击了DEPLOY to HEROKU按钮.一切都很好.但是我无法访问Parse Dashboard.

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

http://test1000000.herokuapp.com/apps

=> Cannot GET /apps

http://test1000000.herokuapp.com/

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

我想念什么吗?

推荐答案

是的.检查文档. 如果您确实希望它们在同一应用程序中,请查看docs的这一部分

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

如果要同时运行Parse Server和Parse Dashboard 服务器/端口,您都可以将它们作为快速中间件运行:

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仪表板中进行操作.

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.

这篇关于如何在Heroku上访问Parse Dashboard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆