mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
refactor(cloudcmd) route add to express middleware
This commit is contained in:
parent
168e29418a
commit
3b86ca97d3
2 changed files with 25 additions and 17 deletions
|
|
@ -99,6 +99,7 @@
|
|||
lHTTPServer = function() {
|
||||
expressApp = express.getApp([
|
||||
Rest,
|
||||
Route,
|
||||
join,
|
||||
controller
|
||||
]);
|
||||
|
|
@ -182,8 +183,8 @@
|
|||
if (lConfig.rest && !expressApp)
|
||||
lRet = Util.exec(Rest, pReq, pRes);
|
||||
|
||||
if (!lRet && Route)
|
||||
lRet = Util.exec(Route, data);
|
||||
if (!lRet && !expressApp)
|
||||
lRet = Util.exec(Route, pReq, pRes);
|
||||
|
||||
if (!lRet && !expressApp)
|
||||
lRet = join(pReq, pRes);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue