Skip to content

usefulio/mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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();
})();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published