npm.io
5.0.0 • Published 4 years ago

mr-potato-head

Licence
MIT
Version
5.0.0
Deps
1
Size
6 kB
Vulns
0
Weekly
0

mr-potato-head

Get an arbitrary, common mysql lock

Installation

$ npm install --save mr-potato-head

# And one of the following:
$ npm install --save pg
$ npm install --save mysql2

Usage

var mrPotatoHead = require('mr-potato-head');

mrPotatoHead({
    dialect: 'mysql', // or postgres
    host: 'localhost',
    username: 'database',
    password: 'databasepassword',
    database: 'databasename',
}).lock(function(error) {
    if (error) {
        // no lock for you!
    }
});

Keywords