# crane

> Diligent work queue for Node.js.

Latest version **0.2.0** (published 2014-04-01) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2014-04-01 |
| First published | 2012-02-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.4.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Jared Hanson |
| Maintainers | jaredhanson |
| Keywords | queue, mq, job, task, work, worker, amqp |

## Links

- npm: https://www.npmjs.com/package/crane
- Repository: https://github.com/jaredhanson/crane
- Issues: http://github.com/jaredhanson/crane/issues
- npm.io page: https://npm.io/package/crane

## Dependencies (5)

- [debug](https://npm.io/package/debug.md) 0.7.x
- [urlpattern](https://npm.io/package/urlpattern.md) 0.1.x
- [utils-merge](https://npm.io/package/utils-merge.md) 1.x.x
- [configurable](https://npm.io/package/configurable.md) 0.0.x
- [utils-flatten](https://npm.io/package/utils-flatten.md) 1.x.x

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2014-04-01
- 0.1.0 — 2012-02-21

## README

# Crane

[![Build](https://travis-ci.org/jaredhanson/crane.png)](https://travis-ci.org/jaredhanson/crane)
[![Coverage](https://coveralls.io/repos/jaredhanson/crane/badge.png)](https://coveralls.io/r/jaredhanson/crane)
[![Quality](https://codeclimate.com/github/jaredhanson/crane.png)](https://codeclimate.com/github/jaredhanson/crane)
[![Dependencies](https://david-dm.org/jaredhanson/crane.png)](https://david-dm.org/jaredhanson/crane)
[![Tips](http://img.shields.io/gittip/jaredhanson.png)](https://www.gittip.com/jaredhanson/)


Crane is a [message queue](http://en.wikipedia.org/wiki/Message_queue)
middleware layer for [Node](http://nodejs.org).  Applications can be constructed
by using _middleware_ and defining _routes_.

This architecture has been proven effective by [Express](http://expressjs.com/),
which provides HTTP middleware.  Crane adopts this approach, repurposing it
for use with message queues, allowing workers to be built quickly and easily,
using patterns familiar to Node.js developers.

## Install

    $ npm install crane
    
## Usage

    var crane = require('crane');
    var app = crane();
    
    app.work('tasks/email', function(msg, next) {
      console.log('sending email to: ' + msg.body.to);
      msg.ack();
    });

## Adapters

Adapters are used to connect to message queues, receiving messages and
dispatching those messages to the application for processing.

The following table lists commonly used strategies:

|Adapter                                           |Developer                                       |
|--------------------------------------------------|------------------------------------------------|
|[AMQP](https://github.com/jaredhanson/crane-amqp) |[Jared Hanson](https://github.com/jaredhanson)  |

## Tests

    $ npm install
    $ make test

## Credits

  - [Jared Hanson](http://github.com/jaredhanson)

## License

[The MIT License](http://opensource.org/licenses/MIT)

Copyright (c) 2011-2014 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>

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