0.0.3 • Published 4 years ago

@tick-core/mongo v0.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

tick-core-mongo: mongo client

下载

npm install @tick-core/mongo --save
npm install mongoose --save
npm install @types/mongoose --save

使用

import {
  MongoConf,
  InitMongo
} from '@tick-core/mongo'

const conf: Record<string, MongoConf> = {
  test: {
    host: 'xxxxxx',
    port: 27017,
    db: 'xxx',
    username: 'xxx',
    password: 'xxxccc'
  }
}

const mongo: InitMongo = new InitMongo(conf)
const testClient = await mongo.getClient('test')
0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago