Skip to content

Commit

Permalink
Create function to initialize firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Alza committed Jul 29, 2024
1 parent 4658803 commit 1a27fe0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions translation-app-assessment/backend/cleanup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const firebaseAdmin = require('firebase-admin')
const { SecretManagerServiceClient } = require('@google-cloud/secret-manager');
const secretManagerServiceClient = new SecretManagerServiceClient();
const Monitoring = require('@google-cloud/monitoring')
const firestore = firebaseAdmin.firestore()
// Init express.js app
const app = express()
app.use(bodyParser.json())
Expand All @@ -34,7 +33,7 @@ const projectId = process.env.GCP_PROJECT

// Call initializeFirebase during startup
initializeFirebase();

const firestore = firebaseAdmin.firestore()

// Function to write monitoring "heartbeat" that cleanup has run
const writeMonitoring = async () => {
Expand Down

0 comments on commit 1a27fe0

Please sign in to comment.