Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-mongo-transaction

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-mongo-transaction

koa middleware to provide declarative transaction for mongodb

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

koa-mongo-transaction

koa middleware to provide declarative transaction for mongodb.

Example

For koa:

var Koa = require('koa');
var koaMongoTransaction = require('koa-mongo-transaction');
 
var app = new Koa();
app.use(koaMongoTransaction());
 
app.use(async ctx => {
  await dbOp();
});

options

patchMongo

Whether monkey patch the mongodb package so that you don't have to specify session option for every command. Defaults to true.

mongoClient

MongoClient instance to use. If not set, an attempt to require('mongoose') to retrieve MongoClient instance will be made.

Keywords

FAQs

Package last updated on 27 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc