Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
16 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
const path = require('path'); | ||
module.exports = { | ||
mockPath : process.argv[2] || './mockRoot', //模拟文件根目录 | ||
//proxyTarget : 'http://localhost:2011',//后台接口服务地址(代理目标) | ||
proxyTarget : '',//后台接口服务地址(代理目标) | ||
isHttps: false, | ||
port : process.argv[3] || 8085, //端口 | ||
checkPath : function(urlPath) { //urlPath校验函数,返回true表示需要进行处理 | ||
mockPath : './mockRoot', //模拟文件根目录 | ||
proxyTarget : 'http://localhost:2011',//后台接口服务地址(代理目标),为空表示不代理 | ||
isHttps: false, //是否https | ||
port : 8085, //端口 | ||
checkPath : function(urlPath) { //urlPath校验函数,返回true表示需要进行处理,为false直接走代理 | ||
if(urlPath.indexOf('/i/') > -1) return true | ||
var ext = path.extname(urlPath); | ||
return ext.indexOf('.as') == 0 || ext == '.axd' //aspx、ashx、asmx等 | ||
return /\.as\wx|\.axd|\.jsp/i.test(ext) //aspx、ashx、asmx、axd、jsp等 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
rem netstat -ano | find "80" | ||
taskkill /im node.exe | ||
|
||
%~d0 | ||
cd %~dp0 | ||
|
||
node index.js | ||
node index.js ./config.js |