Skip to content

PopSugar/parsemutex

Repository files navigation

Parse Mutex

A Network Distributed Lock Mechanism for Parse

How to use it?

Install the library

$ echo @PopSugar:registry=https://npm.pkg.github.com/ >> .npmrc
$ npm install @PopSugar/parsemutex --save

Create a file for mutex

const ParseMutex = require('@PopSugar/parsemutex').default;

const mutex = new ParseMutex(databaseURI, 'sparkle');

module.exports = mutex;

Use mutex

const mutex = require('FILE YOU CREATED');

mutex.lock('name of lock', () => {
  // do anything.
});

About

A Network Distributed Lock Mechanism for Parse

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages