Commit f091824e authored by Addy Osmani's avatar Addy Osmani

Update server to latest Firebase

parent bc01eed6
......@@ -2,11 +2,16 @@ import Firebase from 'firebase'
import LRU from 'lru-cache'
let api
const config = {
databaseURL: 'https://hacker-news.firebaseio.com'
}
const version = '/v0'
if (process.__API__) {
api = process.__API__
} else {
api = process.__API__ = new Firebase('https://hacker-news.firebaseio.com/v0')
Firebase.initializeApp(config)
api = process.__API__ = Firebase.database().ref(version)
// fetched item cache
api.cachedItems = LRU({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment