Point v2 functions @ localhost during emulation (#597)
This commit is contained in:
parent
7bbc425690
commit
2fbbc66029
|
@ -41,8 +41,13 @@ export async function call(url: string, method: string, params: any) {
|
||||||
// one less hop
|
// one less hop
|
||||||
|
|
||||||
export function getFunctionUrl(name: string) {
|
export function getFunctionUrl(name: string) {
|
||||||
const { cloudRunId, cloudRunRegion } = ENV_CONFIG
|
if (process.env.NEXT_PUBLIC_FIREBASE_EMULATE) {
|
||||||
return `https://${name}-${cloudRunId}-${cloudRunRegion}.a.run.app`
|
const { projectId, region } = ENV_CONFIG.firebaseConfig
|
||||||
|
return `http://localhost:5001/${projectId}/${region}/${name}`
|
||||||
|
} else {
|
||||||
|
const { cloudRunId, cloudRunRegion } = ENV_CONFIG
|
||||||
|
return `https://${name}-${cloudRunId}-${cloudRunRegion}.a.run.app`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createMarket(params: any) {
|
export function createMarket(params: any) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user