如何获取托管在AWS EC2上的Parse服务器的APP_ID和CLIENT_KEY [英] How to obtain APP_ID and CLIENT_KEY for Parse server hosted on a EC2 of AWS

查看:117
本文介绍了如何获取托管在AWS EC2上的Parse服务器的APP_ID和CLIENT_KEY的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的是AWSEC2的新手,我试图将Android项目与托管在EC2实例上的新Parse服务器挂钩,但为了在我的服务器中初始化服务器项目,我需要我的APP_ID和CLIENT_KEY,出于某种愚蠢的原因,我找不到它们.

I am really new to AWS and EC2, and I am trying to hook my Android project with my new Parse server hosted on my EC2 instance but in order to initialize my server in my project, I need my APP_ID and CLIENT_KEY which for some silly reason I cannot find them.

这是我到目前为止所做的:

Here is what I have done till now:

  • 正在使用Java SSH客户端,因为它不起作用!相反,我使用的是独立 SSH客户端
  • 通过我的终端(Mac)成功连接到bitnami解析服务器.

  • I am Not using a Java SSH Client since It doesn't working! Instead I am using the alternative which is a standalone SSH client
  • Connected to bitnami parse server via my terminal (Mac), with success.

我获得了用户名和密码,并且可以访问我的Parse仪表板.

I obtained my username and password and I have access to my Parse dashboard.

我遇到的大多数建议都是通过浏览器连接提供基于Java SSH客户端的解决方案,但是就像我说的那样,我使用的是Standalone.那么我如何获得它呢?

Most suggestions I came across, where giving solutions based on a Java SSH client via Browser connection, but like I said, I am using the Standalone one. So how do I obtain it??

这是我的代码:

 Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())

        //where do I Find my APP_ID
        .applicationId("myappid")

        //where do I Find my CLIENT_KEY
        .clientKey(null)

        .server("http://ec2-xx-xxx-xxx-xx.us-east-2.compute.amazonaws.com/parse/")
        .build()
);


ParseObject object = new ParseObject("ExampleObject");
object.put("myNumber", "123");
object.put("myString", "rob");

object.saveInBackground(new SaveCallback () {
  @Override
  public void done(ParseException ex) {
    if (ex == null) {
      Log.i("Parse Result", "Successful!");
    } else {
      Log.i("Parse Result", "Failed" + ex.toString());
    }
  }
});

推荐答案

我要做的就是打开在我的终端中运行的Bitnami解析服务器上的server.js文件.这是通过执行以下操作(在Terminal的Bitnami解析服务器中)实现的:

Turnes out all I had to do was to open the server.js file on the Bitnami parse server running in my terminal. And that's achieved by doing the following (In the Bitnami parse server in Terminal):

cd /opt/bitnami/apps/parse/htdocs/ 

然后:

vi server.js

这篇关于如何获取托管在AWS EC2上的Parse服务器的APP_ID和CLIENT_KEY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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