Connect using firebase rather than firebase-admin?
vkarpov15 opened this issue · 2 comments
vkarpov15 commented
kleinfreund commented
I believe this section is supposed to cover that: https://firebase.google.com/docs/web/setup#add_firebase_to_your_app
In particular:
// Initialize Firebase
// TODO: Replace with your project's customized code snippet
var config = {
apiKey: "<API_KEY>",
authDomain: "<PROJECT_ID>.firebaseapp.com",
databaseURL: "https://<DATABASE_NAME>.firebaseio.com",
storageBucket: "<BUCKET>.appspot.com",
};
firebase.initializeApp(config);
nicolasgarnier commented
Yup there are not really anything differences in using the JS sdk ou in Node vs Web. The only difference is in the install and import.
Install the SDK with: npm install --save firebase
Import the SDK with: var firebase = require('firebase');