Provided by [Stagg.co](https://stagg.co)
npm install @stagg/mdb
yarn install @stagg/mdb
`
Configure the connection on startup (only done once).
`typescript
import * as mdb from '@stagg/mdb'
(async () => {
mdb.config({ host, user, password })
const db = await mdb.client('dbName')
// ... do stuff
})()
`
In any subsequent requests, only the client needs to be fetched.
`typescript
import * as mdb from '@stagg/mdb'
(async () => {
const db = await mdb.client('dbName')
// ... do stuff
})()
`
The config interface can be found in
`typescript
export interface Config {
host:string
user:string
password:string
}
``