@stagg/mongo
v0.2.2
Published
Provided by [Stagg.co](https://stagg.co)
Downloads
4
Readme
Stagg MongoDB Integration
Provided by Stagg.co
Getting Started
Install the package
yarn install @stagg/mongo
Configure the connection on startup (only done once).
import * as Mongo from '@stagg/mongo'
(async () => {
const cfg:Mongo.Config = {...}
Mongo.config(cfg)
const db = await Mongo.client()
// ... do stuff
})()
In any subsequent requests, only the client needs to be fetched.
import * as Mongo from '@stagg/mongo'
(async () => {
const db = await Mongo.client()
// ... do stuff
})()
The config interface can be found in <PKG>.Config
export interface Config {
db:string
host:string
user:string
password:string
}
Call of Duty
Currently supports Warzone