MCPcopy Index your code
hub / github.com/dev-mastery/comments-api / makeDb

Function makeDb

src/data-access/index.js:9–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7const client = new MongoClient(url, { useNewUrlParser: true })
8
9export async function makeDb () {
10 if (!client.isConnected()) {
11 await client.connect()
12 }
13 return client.db(dbName)
14}
15
16const commentsDb = makeCommentsDb({ makeDb })
17export default commentsDb

Callers 10

e2e.spec.jsFile · 0.90
index.jsFile · 0.90
findAllFunction · 0.70
findByIdFunction · 0.70
findByPostIdFunction · 0.70
findRepliesFunction · 0.70
insertFunction · 0.70
updateFunction · 0.70
removeFunction · 0.70
findByHashFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected