We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc01eed commit f091824Copy full SHA for f091824
src/store/create-api-server.js
@@ -2,11 +2,16 @@ import Firebase from 'firebase'
2
import LRU from 'lru-cache'
3
4
let api
5
+const config = {
6
+ databaseURL: 'https://hacker-news.firebaseio.com'
7
+}
8
+const version = '/v0'
9
10
if (process.__API__) {
11
api = process.__API__
12
} else {
- api = process.__API__ = new Firebase('https://hacker-news.firebaseio.com/v0')
13
+ Firebase.initializeApp(config)
14
+ api = process.__API__ = Firebase.database().ref(version)
15
16
// fetched item cache
17
api.cachedItems = LRU({
0 commit comments