-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated the service example with secret and semver
- Loading branch information
James Halliday
committed
Feb 9, 2012
1 parent
27e6fdd
commit 964d009
Showing
4 changed files
with
9 additions
and
9 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
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,8 +1,8 @@ | ||
var seaport = require('../../'); | ||
var ports = seaport.connect('localhost', 9090); | ||
var ports = seaport.connect('localhost', 9090, { secret : 'beep boop' }); | ||
var request = require('request'); | ||
|
||
ports.get('http', function (ps) { | ||
ports.get('web@1.2.x', function (ps) { | ||
var u = 'http://' + ps[0].host + ':' + ps[0].port; | ||
request(u).pipe(process.stdout); | ||
}); |
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,11 +1,11 @@ | ||
var seaport = require('../../'); | ||
var ports = seaport.connect('localhost', 9090); | ||
var ports = seaport.connect('localhost', 9090, { secret : 'beep boop' }); | ||
var http = require('http'); | ||
|
||
var server = http.createServer(function (req, res) { | ||
res.end('beep boop\r\n'); | ||
}); | ||
|
||
ports.service('http', function (port, ready) { | ||
ports.service('web@1.2.3', function (port, ready) { | ||
server.listen(port, ready); | ||
}); |
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