Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
1. install java
2. sudo apt-get install npm
3. Download latest ES
4. sudo dpkg -i elasticsearch-<version>.deb
5. (optional) sudo update-rc.d elasticsearch defaults
Configure it
The Elasticsearch configuration files are in the /etc/elasticsearch
Example: firebasesyncapp node_fb_1 /home/elasticsearch
path.logs: /home/elasticsearch/logs (worry about security later ;)
http.port: 9200
6. $service elasticsearch start
7. Test if everythins is ok:
$service elasticsearch status (should show running)
from your browser http://serverip:9200 should show a json file with configurations.
8. Install Flashlight
$mkdir /tmp/flashlight
$cd /tmp/flashlight
git clone
$cd flashlight (where the package.json file is)
npm install
generate a new Firebase service account and configuring FB_SERVICEACCOUNT,
create a new file on the server names service_account.json and paste the content of the downloaded file
9. edit the config file: change the firebase url (FB_URL) to your database. and on the FB_ACCOUNT write "service_account.json"
10. $nodejs app.js
11. You have some data into your database right? Let's test the query
in your browser:
http://server_ip:9200/_search?source={ "from" : 0, "size" : 100 , "query": { "match_all": {}} }
That's all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment