Permalink
Browse files

[api] Added cluster examples

  • Loading branch information...
1 parent ba8fd91 commit c9a233101528eb8e42718c6ec687f43603c74e2d @Marak committed May 17, 2011
Showing with 12 additions and 0 deletions.
  1. +7 −0 app.js
  2. +5 −0 cluster.js
View
7 app.js
@@ -0,0 +1,7 @@
+var http = require('http');
+
+module.exports = http.createServer(function(req, res){
+ res.writeHead(200, {'Content-Type': 'text/plain'});
+ res.write('hello, i know nodejitsu.')
+ res.end();
+});
View
@@ -0,0 +1,5 @@
+var cluster = require('cluster')
+ , app = require('./app');
+
+ cluster(app)
+ .listen(3000);

0 comments on commit c9a2331

Please sign in to comment.