How to call a MongoDB function

Hi,

I finished my first mongo function. I want to know where I call this function so I can access the data it calls. Would I call it in sagas.js? Or directly into my code where I need it called? Anything helps!

Thanks,

-Josh

Hi @Josh_Stout,

A function can be called from verious places. If you specify its as private it can only be called internally from your hosted application components like other functions, rules or triggers.

If you specify it as NOT private it can be called via one of our SDKs used in your client code

https://docs.mongodb.com/realm/functions/call-a-function/#call-from-a-client-application

You can also build functions to interact with data via http or other services

https://docs.mongodb.com/realm/services/configure/service-webhooks/
Let me know if that helps.

Pavel