feature(cloudcmd) add prefix support

This commit is contained in:
coderaiser 2015-06-21 12:50:48 -04:00
parent 67d9b7981e
commit a74e49f4ab
6 changed files with 29 additions and 12 deletions

View file

@ -37,7 +37,7 @@
module.exports = function(params) {
var keys,
p = params || {},
prefix = p.prefix || '/cloudcmd';
prefix = p.prefix || '';
if (params) {
keys = Object.keys(params);
@ -47,6 +47,9 @@
});
}
if (p.socket)
module.exports.listen(p.socket);
return cloudcmd(prefix);
};
@ -110,7 +113,9 @@
root : root
}),
rest,
route,
route({
prefix: prefix
}),
join({
dir : DIR_ROOT,