适用于开发人员的AWS上的高级Parse服务器设置 [英] Advanced Parse server setup on AWS for a developer

查看:82
本文介绍了适用于开发人员的AWS上的高级Parse服务器设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试使用其建议的Elastic Beanstalk路径在AWS上创建解析服务器,以简化流程.这里有一个非常原始的指南: https ://mobile.awsblog.com/post/TxCD57GZLM2JR/How-to-set-up-parse-Server-on-AWS-using-AWS-Elastic-Beanstalk

I'm currently trying to create a parse server on AWS using their suggested path of Elastic Beanstalk to simplify the process. There is a very primitive guide here: https://mobile.awsblog.com/post/TxCD57GZLM2JR/How-to-set-up-Parse-Server-on-AWS-using-AWS-Elastic-Beanstalk

我能够运行它,但是现在有一些问题: 1)我无法使用EB CLI连接到我的实例.这部分: 高级:更新和部署代码状态仅需调用: eb init并选择您创建的应用程序.然后调用eb labs download.这只会返回未设置任何环境的错误.我尝试使用eb list,所以我可以打电话给eb use XXX,但是什么也没返回.

I was able to get this running but I now have a few issues: 1) I am unable to use EB CLI to connect to my instance. The section: ADVANCED: Updating and Deploying your code states to simply call: eb init and pick your application that you created. Then call eb labs download This only returns an error that no environment has been setup. I try to use eb list so I can call eb use XXX but nothing is returned.

2)我想安装Parse仪表板,但不知道如何登录,因此可以致电npm install.

2) I want to install the Parse dashboard but have no idea how to log in so I can call npm install.

任何有关这些主题的指南或资源将非常有帮助.甚至是步骤的概述.在过去的48小时中,我一直在努力尝试以确保一切正常运行.

Any guidance or resources to read on these topics would be very helpful. Even an outline of the steps. I've spent the last 48 hours straight on trying to get this up and running without any luck.

谢谢

大卫

推荐答案

当我刚刚在AWS上进行生产Parse Server部署时,我可以为您的问题的第2部分提供答案.我使用解析服务器示例1.4.0 作为我的基础,并将mod添加到索引中.js和package.json.最初,我按照AWS with Elastic Beanstalk指南进行了所有工作.至少需要使用Parse Dashboard 1.0.8,因为Express中的安装已得到修复.

I can provide an answer to part 2 of your question as I just went through this on AWS for a production Parse Server deployment. I am using the Parse Server Example 1.4.0 as my base and adding mods to the index.js and package.json for this. I originally got everything working following the AWS with Elastic Beanstalk guide. This requires at least Parse Dashboard 1.0.8 because of the fixes to the mounting in express.

在package.json中,这是我的依赖项列表(npm会在部署到AWS时自动安装这些依赖项):

In the package.json here is my dependencies list (npm will automatically install these when deploying to AWS):

"dependencies": {
  "express": "~4.11.x",
  "kerberos": "~0.0.x",
  "parse": "~1.8.0",
  "parse-server": "~2.2.6",
  "parse-dashboard": "~1.0.8"
},

然后,在index.js中添加分析仪表板":

Then, in the index.js add the Parse Dashboard:

...
var ParseServer = require('parse-server').ParseServer;
var ParseDashboard = require('parse-dashboard');
...
// Added near the end of the file after the createLiveQueryServer
// Try to setup the dashboard
var config = {
  "apps": [
    {
      "serverURL": "yourparsedomain" + mountPath,
      "appId": "YOUR_APP_ID",
      "masterKey": "YOUR_MASTER_KEY",
      "javascriptKey": "YOUR_JAVASCRIPT_KEY",
      "restKey": "YOUR_REST_KEY",
      "appName": "YOUR_APP_NAME",
      "appNameForURL": "uniquename",
      "production": true
    }
  ],
  "users": [
    {
      "user":"user1",
      "pass":"pass1"
    },
    {
      "user":"user2",
      "pass":"pass2"
    }
  ]
};
var allowInsecureHTTP = false;
var dash = ParseDashboard(config, allowInsecureHTTP);
app.use('/dash', dash);

如果您未使用SSL,请设置allowInsecureHTTP = true;

If you are not using SSL set allowInsecureHTTP = true;

现在,您可以在启用用户安全性的情况下,通过"yourparsedomain/dash"访问解析仪表板".用户安全性很重要,因为您不希望万能钥匙泛滥成灾.

Now you can access your Parse Dashboard at "yourparsedomain/dash" with user security enabled. The user security is important because you don't want your Master Key getting out in the wild.

这篇关于适用于开发人员的AWS上的高级Parse服务器设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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