When calling the context.services.get(<SERVICE_NAME>)
function, what does <SERVICE_NAME>
get set with?
I’ve seen that it should be set to your cluster name. And that seems to work best, but still not useful. When doing:
const service = context.services.get("Cluster0");
service gets this as a return object:
{"version":1}
Then is using service
to get a db instance, it doesn’t work. So this…
const db = service.db("prod");
creates db
as {}
- which is unusable.
If I try anything other than “Cluster0” as the <SERVICE_NAME>
, then the service
object is undefined
.
I can’t find anything in the documentation on this. Does anyone have a read into this? Much appreciated.
- k