mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(cloudcmd) root could be changed without restarting
This commit is contained in:
parent
83b7b8b268
commit
64ba44e4d2
1 changed files with 8 additions and 4 deletions
|
|
@ -21,13 +21,17 @@
|
|||
edward = require('edward'),
|
||||
dword = require('dword'),
|
||||
|
||||
root = function() {
|
||||
return config('root');
|
||||
},
|
||||
|
||||
emptyFunc = function(req, res, next) {
|
||||
next();
|
||||
};
|
||||
|
||||
emptyFunc.middle = function() {
|
||||
return emptyFunc;
|
||||
};
|
||||
},
|
||||
|
||||
module.exports = function(params) {
|
||||
var keys,
|
||||
|
|
@ -61,12 +65,12 @@
|
|||
|
||||
edward.listen(socket, {
|
||||
size: size,
|
||||
root: config('root')
|
||||
root: root
|
||||
});
|
||||
|
||||
dword.listen(socket, {
|
||||
size: size,
|
||||
root: config('root')
|
||||
root: root
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -92,7 +96,7 @@
|
|||
config(),
|
||||
restafary({
|
||||
prefix : cloudfunc.apiURL + '/fs',
|
||||
root : config('root')
|
||||
root : root
|
||||
}),
|
||||
rest,
|
||||
route,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue