mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +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
|
|
@ -36,13 +36,22 @@
|
|||
|
||||
Template = {},
|
||||
|
||||
Prefix,
|
||||
FS = CloudFunc.FS;
|
||||
|
||||
module.exports = function(req, res, next) {
|
||||
module.exports = function(params) {
|
||||
var p = params || {};
|
||||
|
||||
Prefix = p.prefix || '';
|
||||
|
||||
return middle;
|
||||
};
|
||||
|
||||
function middle(req, res, next) {
|
||||
readFiles(function() {
|
||||
route(req, res, next);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* additional processing of index file
|
||||
|
|
@ -77,7 +86,8 @@
|
|||
|
||||
data = rendy(data, {
|
||||
title : CloudFunc.getTitle(),
|
||||
fm : left + right
|
||||
fm : left + right,
|
||||
prefix : Prefix
|
||||
});
|
||||
|
||||
return data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue