Monday, 20 May 2019

How to find firebase function running locally or not from code

I wanted to assign a url to firbase functions

const localUrl = localUrlBase + apiEndpoint
const onlineUrl = onlineURLBase + apiEndpoint 
const urlToUse = process.env.dev? localUrl : onlineUrl

Now, when I am running functions locally, I am expecting it assign localUrl but it is assigning onlineUrl

How to know from the code if functions are hosted online or are running locally.



from How to find firebase function running locally or not from code

No comments:

Post a Comment