Code Monkey home page Code Monkey logo

Comments (5)

aalej avatar aalej commented on July 17, 2024

Hey @alexpchin, thanks for reaching out. Let me know if I may be wrong here, but from what I can tell, you’re trying to trigger local functions based on production events. If so, this is not possible. A detailed explanation can be found in #1962 (comment).

However, if you’re trying to read/write data from/to production, you could use the Firebase Admin SDK.

from firebase-tools.

alexpchin avatar alexpchin commented on July 17, 2024

Hello @aalej Please can you re-open. I'm not trying to trigger local functions based on production events. I've got some firebase functions that are callable, http etc. What I want to be able to do is to call the functions from a localhost endpoint but for them to use the production firebase credentials.

This is part of a bigger task of trying to use the emulators within the context of a PR. I believe it should be possible to use the firebase functions locally, so that they are callable but they use a real firestore database in the config.

from firebase-tools.

alexpchin avatar alexpchin commented on July 17, 2024

I pretty much want to run as if I'm using:

firebase serve --only functions

from firebase-tools.

aalej avatar aalej commented on July 17, 2024

Thanks for the clarification @alexpchin. Just to verify, from what I understand you have Firebase Cloud Functions such as an HTTP function. When the function runs, you want to use the same credentials from production as credentials for the Firebase Admin SDK to write data to Cloud Firestore.

Is my understanding here correct, or am I missing anything? Would you be able to share a sample code snippet of your function?

from firebase-tools.

joehan avatar joehan commented on July 17, 2024

Hey @alexpchin - this message function ignored because the firestore emulator does not exist or is not running. will be shown when the Functions emulator skips over a Firestore triggered function. If you have HTTP or callable functions, they are still running.

from firebase-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.