@useful/mongo
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

@useful/mongo

Example usage

import {
  connect,
  disconnect,
  getDatabase,
  getCollection,
  generateId
} from "@userful/mongo";

(async function() {
  await connect();
  const Users = await getCollection("users");
  const user = await Users.findOne({});
  await Users.insert({
    _id: generateId()
    /* Other fields */
  });
  await disconnect();
})();

Readme

Keywords

none

Package Sidebar

Install

npm i @useful/mongo

Weekly Downloads

0

Version

0.3.1

License

none

Unpacked Size

5.17 kB

Total Files

7

Last publish

Collaborators

  • gevou
  • ianserlin
  • lelelew
  • lukejagodzinski