@phenyl/mongodb
TypeScript icon, indicating that this package has built-in type declarations

4.1.0 • Public • Published

@phenyl/mongodb

MongoDB client.

usage

See here if you use phenylMongoDbClient on your server.

import { PhenylMongoDbClient, connect } from "@phenyl/mongodb"

const connection = await connect({
  url: "mongodb://localhost:27017",
  dbname: "mydb",
});

const phenylMongoDbClient = new PhenylMongoDbClient(connection)

await phenylMongoDbClient.insertAndGet({ entityName: "user", value: { id: "user" } })
const { entity: user } = phenylMongoDbClient.get({ entityName: "user", id: "user" })

Readme

Keywords

none

Package Sidebar

Install

npm i @phenyl/mongodb

Weekly Downloads

154

Version

4.1.0

License

Apache-2.0

Unpacked Size

45.7 kB

Total Files

13

Last publish

Collaborators

  • shinout
  • naturalclar
  • sasurau4
  • wh1tecat
  • bowzstandard
  • alternacrow
  • camcam-lemon
  • 1natsu