MCPcopy Index your code
hub / github.com/serverless/examples / dbExecute

Function dbExecute

aws-node-rest-api-mongodb/handler.js:16–16  ·  view source on GitHub ↗
(db, fn)

Source from the content-addressed store, hash-verified

14});
15
16const dbExecute = (db, fn) => db.then(fn).finally(() => db.close());
17
18function dbConnectAndExecute(dbUrl, fn) {
19 return dbExecute(mongoose.connect(dbUrl, { useMongoClient: true }), fn);

Callers 1

dbConnectAndExecuteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected