Permalink
Browse files

host:port shorthand for .connect()

  • Loading branch information...
1 parent 8424bab commit d38394be58fd1a6d360890e7f0ada7aa9eccb535 @substack committed Mar 25, 2012
Showing with 7 additions and 2 deletions.
  1. +6 −1 index.js
  2. +1 −1 package.json
View
@@ -8,7 +8,12 @@ exports.connect = function () {
if (arg && typeof arg === 'object' && arg.secret) {
acc.secret = arg.secret;
}
- acc.args.push(arg);
+
+ if (typeof arg === 'string' && /:/.test(arg)) {
+ var s = arg.split(':');
+ acc.args.push(s[0], parseInt(s[1], 10));
+ }
+ else acc.args.push(arg);
return acc;
}, { args : [] });
View
@@ -1,7 +1,7 @@
{
"name" : "seaport",
"description" : "service registry and port assignment for clusters",
- "version" : "0.6.3",
+ "version" : "0.6.4",
"repository" : {
"type" : "git",
"url" : "git://github.com/substack/seaport.git"

0 comments on commit d38394b

Please sign in to comment.