Skip to content

Commit bc01eed

Browse files
committed
Update api-client to modular Firebase
1 parent b3c36f1 commit bc01eed

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/store/create-api-client.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
import Firebase from 'firebase'
1+
import Firebase from 'firebase/app'
2+
import 'firebase/database'
23

3-
export default new Firebase('https://hacker-news.firebaseio.com/v0')
4+
const config = {
5+
databaseURL: 'https://hacker-news.firebaseio.com'
6+
}
7+
const version = '/v0'
8+
9+
Firebase.initializeApp(config)
10+
const api = Firebase.database().ref(version)
11+
export default api

0 commit comments

Comments
 (0)