Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
initialise firebase in nodejs expressjs

i want to initialise a firebase (not firebase-admin) instance in Node.

import { initializeApp } from 'firebase/app';

const firebaseConfig = {
  //...
};

const app = initializeApp(firebaseConfig);

this won't work cause node works with commonjs exports and you can't require from firebase cause there is no exports..

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

https://www.npmjs.com/package/firebase says:

This SDK is intended for end-user client access from environments such as the Web, mobile Web (e.g. React Native, Ionic), Node.js desktop (e.g. Electron), or IoT devices running Node.js. If you are instead interested in using a Node.js SDK which grants you admin access from a privileged environment (like a server), you should use the Firebase Admin Node.js SDK.

So use firebase-admin instead if you are planning to use firebase with the backend.

Install with npm install firebase-admin --save

To initialize define a variable export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json" and

const { initializeApp } = require('firebase-admin/app');
initializeApp()
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!