Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[fix] remove and replace example server
- Loading branch information
Showing
2 changed files
with
6 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,12 @@ | ||
/* | ||
* server.js :: An example server with fun reactor things happening | ||
* | ||
* (C) 2013 Nodejits Inc. | ||
* | ||
*/ | ||
|
||
var godot = require('../lib/godot'), | ||
expire = godot.reactor().expire(5000); | ||
var g = require('../'); | ||
|
||
// | ||
// This example shows a way to meausre two separate clients on the same | ||
// `reactor` using the power of the `by` reactor. It will create a new reactor | ||
// pipe-chain for each different 'service' in this case to easily assess the | ||
// expiration of two separate `producers`. | ||
// | ||
godot.createServer({ | ||
g.createServer({ | ||
type: 'tcp', | ||
reactors: [ | ||
godot.reactor() | ||
.by('service', | ||
expire | ||
.console() | ||
) | ||
function (socket) { | ||
socket | ||
.pipe(new g.console()) | ||
} | ||
] | ||
}).listen(1337); |
This file was deleted.
Oops, something went wrong.