在Heroku上设置手电筒,使用新的Firebase进行ElasticSearch [英] Setting up Flashlight on Heroku for ElasticSearch with new Firebase

查看:144
本文介绍了在Heroku上设置手电筒,使用新的Firebase进行ElasticSearch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是将Firebase与ElasticSearch连接起来进行索引,以便在iOS应用中搜索用户名时可以实现like查询。从我所看到的,这是最好的解决方案,我想尽早解决这个问题,以便进行可扩展性,而不是强迫它。



要实现这样,我正在尝试部署Firebase开发人员为Heroku提供的



要获得 FB_TOKEN


  1. 转到 Google开发者控制台

  2. 选择与...相关联的项目您的Firebase项目

  3. 转到凭据页面

  4. 创建一个新的 API密钥或选择是否已经有适当的

注意:
您可以也设置(和s ee)您的Heroku项目中的那些变量(如果您不想从终端设置)。要执行此操作:


  1. 转到您的Heroku项目的设置页面

  2. 点击显示配置变量按钮

祝你好运。


My goal is to connect Firebase with ElasticSearch for indexing so that I can implement "like" queries when searching usernames in my iOS app. From what I've read this is the best solution, and I want to tackle it this way early in order to be scalable instead of brute-forcing it.

To achieve this, I'm trying to deploy the flashlight app that Firebase developers have provided for us onto a Heroku, but I'm confused on how to go about doing it. Please correct me where I'm wrong, I'm fairly new to the Heroku ecosystem, ElasticSearch, and nodejs.

I currently have a Heroku account, and have the toolbelt and nodejs/npm installed on my computer (Mac). I've run the following commands:

git clone https://github.com/firebase/flashlight
cd flashlight
heroku login
heroku create
heroku addons:add bonsai
heroku config

(I was able to get my bonsai url successfully with the heroku config command)

The next step is

heroku config:set FB_NAME=<instance> FB_TOKEN="<token>"

But I don't really understand what FB_NAME (my guess is Firebase app name, but is that the name of my app? or with the letters/numbers following it due to the new Firebase setup where it's no longer app_name.firebaseio.com but app_name-abc123.firebaseio.com) and what is FB_TOKEN? (is it a key or something in my plist I download?)

解决方案

To get your FB_NAME (it's basically your Firebase project's ID):

  1. Go to Project Settings
  2. Go to General tab
  3. Copy your Project ID

To get your FB_TOKEN:

  1. Go to your Google Developer Console
  2. Select the project that is associated with your Firebase project
  3. Go to Credentials page
  4. Create a new API Key or choose if you have an appropriate one already

Note: You can also set (and see) those variables in you Heroku project (if you don't want to set it from the terminal). To do that:

  1. Go to your Heroku project's Settings page
  2. Click on the Reveal Config Variables button

Good luck.

这篇关于在Heroku上设置手电筒,使用新的Firebase进行ElasticSearch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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