# ith

> Simple redis-based proces locking tool

Latest version **1.0.6** (published 2016-03-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install ith
pnpm add ith
yarn add ith
bun add ith
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2016-03-03 |
| First published | 2016-02-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jakub Mrowiec - Alkagar |
| Maintainers | alkagar |
| Keywords | node, redis, lock |

## Links

- npm: https://www.npmjs.com/package/ith
- Repository: https://github.com/Alkagar/node-ith
- Homepage: https://github.com/Alkagar/node-ith#readme
- Issues: https://github.com/Alkagar/node-ith/issues
- npm.io page: https://npm.io/package/ith

## Dependencies (4)

- [redis](https://npm.io/package/redis.md) ^2.4.2
- [bunyan](https://npm.io/package/bunyan.md) ^1.6.0
- [eslint](https://npm.io/package/eslint.md) ^2.0.0
- [lodash](https://npm.io/package/lodash.md) ^4.5.1

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2016-03-03
- 1.0.5 — 2016-03-03
- 1.0.4 — 2016-03-02
- 1.0.2 — 2016-02-20
- 1.0.1 — 2016-02-14
- 1.0.0 — 2016-02-14

## README

# Ith
Simple module for starting only single instance of node process across many
servers. Ith uses redis as communication channel - for locking purposes.

# Usage
1. firstly you need to install Ith by:
```
npm install ith
```

2. next you need to load Ith dependency into your startup file
```
var ith = require('ith');
```

3. for Ith to be able to communicate between serwers you need to provide him some
redis client, so be so nice and craete one for him:
```
var redis = require('redis');
var client = redis.createClient();
```

4. then it's finally time to create Ith instance:
```
var letsRun = ith({
    redis: client,
    resourceName: 'turbo-node-process-to-start-only-once',
    processName: 'path/to/your/turbo-node-process-to-start-only-once.js',
    extendInterval: 1200,
    ttl: 2000
});

letsRun.start(function() {
    console.log('start');
});
```

---
_Source: https://npm.io/package/ith · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
