Permalink
Browse files

adding more documentation.

  • Loading branch information...
1 parent d7f65a7 commit 430919ec07333771aa3b34ed051472b691cb94ac Joachim Kainz committed Sep 23, 2011
Showing with 34 additions and 0 deletions.
  1. +13 −0 README.md
  2. +1 −0 index.js
  3. +20 −0 package.json
View
@@ -9,9 +9,11 @@ Here is exampe for a master:
var util = require("util");
var backgrounder = require("backgrounder");
var worker = backgrounder.spawn("./worker");
+
worker.on("message", function(message) {
console.log(util.inspect(message, false, 100));
});
+
worker.send({
"title": "hello world!",
"flag": true
@@ -21,4 +23,15 @@ worker.send({
This could be the code of the client:
```
+var util = require("util");
+
+console.log('Started the working');
+
+process.on('message', function(message) {
+ console.log('Worker received: %s', util.inspect(message, false, 100));
+
+ process.send({
+ "received": message
+ });
+});
```
View
@@ -0,0 +1 @@
+module.exports = require("./lib/backgrounder");
View
@@ -0,0 +1,20 @@
+{
+ "name": "backgrounder",
+ "description": "",
+ "url": "http://github.com/jolia/backgrounder",
+ "version": "0.0.1",
+ "author": "Joachim Kainz <info@jolira.com>",
+ "contributors": [{
+ "name": "Joachim Kainz",
+ "email": "info@jolira.com"
+ }],
+ "keywords": ["fork", "spawn", "child", "process", "worker"],
+ "repository": "git://github.com/jolira/backgrounder.git",
+ "main": "index",
+ "scripts": {
+ "prepublish": "npm prune"
+ },
+ "engines": {
+ "node": ">= 0.4.9"
+ }
+}

0 comments on commit 430919e

Please sign in to comment.