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):
Project Settings
General
tabProject ID
To get your FB_TOKEN
:
Credentials
pageAPI Key
or choose if you have an appropriate one alreadyNote: 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:
Settings
pageReveal Config Variables
buttonGood luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With