mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
feature(cloudcmd) add prefix support
This commit is contained in:
parent
67d9b7981e
commit
a74e49f4ab
6 changed files with 29 additions and 12 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue