Skip to content

Commit

Permalink
Replace .env with config file
Browse files Browse the repository at this point in the history
  • Loading branch information
andras-adam committed Nov 6, 2022
1 parent a8ae7e4 commit e259f10
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ node_modules/
# dotenv
.env
.env.test
config.ts

# macOS
.DS_Store
Expand Down
13 changes: 7 additions & 6 deletions firebase.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { initializeApp, FirebaseOptions } from 'firebase/app'
import { env } from './config'


const config: FirebaseOptions = {
apiKey: process.env.API_KEY,
appId: process.env.APP_ID,
authDomain: process.env.AUTH_DOMAIN,
messagingSenderId: process.env.MESSAGING_SENDER_ID,
projectId: process.env.PROJECT_ID,
storageBucket: process.env.STORAGE_BUCKET
apiKey: env.API_KEY,
appId: env.APP_ID,
authDomain: env.AUTH_DOMAIN,
messagingSenderId: env.MESSAGING_SENDER_ID,
projectId: env.PROJECT_ID,
storageBucket: env.STORAGE_BUCKET
}

export const app = initializeApp(config)
5 changes: 3 additions & 2 deletions src/api/wolt.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as Location from 'expo-location'
import { LocationObject } from 'expo-location'
import { useState } from 'react'
import { env } from '../../config'


const baseUrl = 'https://daas-public-api.development.dev.woltapi.com'
const merchantId = process.env.WOLT_MERCHANT_ID
const apiKey = process.env.WOLT_API_KEY
const merchantId = env.WOLT_MERCHANT_ID
const apiKey = env.WOLT_API_KEY
const headers = { 'content-type': 'application/json', 'authorization': `Bearer ${apiKey}` }

async function getCurrentAddress(): Promise<string> {
Expand Down

0 comments on commit e259f10

Please sign in to comment.