Skip to content

Commit

Permalink
move firebase init
Browse files Browse the repository at this point in the history
  • Loading branch information
swantzter committed Mar 17, 2024
1 parent e0a109a commit 335008a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { SecretManagerServiceClient } from '@google-cloud/secret-manager'
import dotenv from 'dotenv'
import { z } from 'zod'
import { initializeApp } from 'firebase-admin/app'
dotenv.config()

initializeApp({
databaseURL: process.env.FIREBASE_DATABASE_URL
})

const envSchema = z.object({
SENTRY_DSN: z.string().url().optional(),
GCP_PROJECT: z.string(),
Expand Down
5 changes: 0 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@ import express from 'express'
import cors from 'cors'
import http from 'http'
import bodyParser from 'body-parser'
import { initializeApp } from 'firebase-admin/app'

const app = express()
const httpServer = http.createServer(app)

initializeApp({
databaseURL: process.env.FIREBASE_DATABASE_URL
})

app.use(cors({
origin: [
/(^https?:\/\/|\.)ropescore\.(com|app|live)(:\d+)?$/,
Expand Down

0 comments on commit 335008a

Please sign in to comment.