This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const contactsRef = database.ref('/'); | |
| contactsRef.on('child_added', addOrUpdateIndexRecord); | |
| contactsRef.on('child_changed', addOrUpdateIndexRecord); | |
| contactsRef.on('child_removed', deleteIndexRecord); | |
| function addOrUpdateIndexRecord(contact) { | |
| // Get Firebase object | |
| const record = contact.val(); | |
| // Specify Algolia's objectID using the Firebase object key | |
| record.objectID = contact.key; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const algoliasearch = require('algoliasearch'); | |
| const dotenv = require('dotenv'); | |
| const firebase = require('firebase'); | |
| // load values from the .env file in this directory into process.env | |
| dotenv.load(); | |
| // configure firebase | |
| firebase.initializeApp({ | |
| databaseURL: process.env.FIREBASE_DATABASE_URL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALGOLIA_APP_ID=<algolia-app-id> | |
| ALGOLIA_API_KEY=<algolia-api-key> | |
| ALGOLIA_INDEX_NAME='algolia-index-name' | |
| FIREBASE_DATABASE_URL=https://<my-firebase-database>.firebaseio.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "rules": { | |
| ".read": true, | |
| ".write": false | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "name":"Hack the 6ix", | |
| "date": "August 24-26", | |
| "city": "Toronto", | |
| "country": "Canada", | |
| "director": "John States" | |
| }, | |
| { | |
| "name":"HackMTY", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
| <style> | |
| .algolia-autocomplete { | |
| width: 100%; | |
| } | |
| .algolia-autocomplete .aa-input, .algolia-autocomplete .aa-hint { | |
| width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let dataAsset = DataAsset.init(image: image) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| access_token= | |
| public_address= | |
| secret=secret | |
| mongo_connection= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| access_token= | |
| public_address= | |
| secret= | |
| trello_key= | |
| trello_token= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALGOLIA_APP_ID=<algolia-app-id> | |
| ALGOLIA_API_KEY=<algolia-api-key> | |
| ALGOLIA_INDEX_NAME='algolia-index-name' | |
| FIREBASE_DATABASE_URL=https://<my-firebase-database>.firebaseio.com |
NewerOlder