Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rmehner/hoodie-worker
base hoodie worker class to inherit from
https://github.com/rmehner/hoodie-worker
Last synced: 5 days ago
JSON representation
base hoodie worker class to inherit from
- Host: GitHub
- URL: https://github.com/rmehner/hoodie-worker
- Owner: rmehner
- Created: 2013-02-28T21:17:03.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-28T22:47:41.000Z (almost 12 years ago)
- Last Synced: 2024-11-09T18:34:31.221Z (about 2 months ago)
- Language: JavaScript
- Size: 683 KB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hoodie Worker
This is the base hoodie worker with some basic functionalities
that your workers can inherit from. Simply add it as dependancy
to your package.json:```js
{
"name": "hoodie-worker-worlddomination",
"dependencies": {
"hoodie-worker": "git://github.com/hoodiehq/hoodie-worker.git"
},
"devDependencies": {
"mocha": "*"
},
"scripts": {
"test": "mocha",
"start": "node index.js"
}
}
```And then intherit from it.
```js
var util = require('util');
var HoodieWorker = require('hoodie-worker');var Worker = function(config) {
this.setup(config).then( this.launch.bind(this) )
};
util.inherits(Worker, HoodieWorker);Worker.prototype.launch = function() {
// your worker magic starts hier!
}
```You can use [worker-new](https://github.com/hoodiehq/worker-new)
as a skeleton for your new worlddomination hoodie worker.