forked from chenchengxing/bird-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
37 lines (36 loc) · 1.21 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var fileServer = require("./index");
var serverSettings = {
"8787": {
"basePath": "E:/baidu-svn/gcrm/src/main/webapp/front"
},
"7676": {
"basePath": "E:/baidu-svn/gcrm/src/main/webapp/front"
}
};
var transRules = {
"7676": {
//目标服务器的ip和端口,域名也可,但注意不要被host了
targetServer: {
"host": "10.46.133.242",//gcrm
"port": "8101"
// "host": "172.21.206.166",//gcrm
// "port": "8080"
// "host": "172.21.206.84",//gcrm
// "port": "8081"
},
//特殊请求转发,可选配置,内部的host、port和attachHeaders为可选参数
regExpPath: {
"gcrm/" : {
path : "gcrm/"
}
// ,
// "vendor/": {
// "host": "127.0.0.1",
// "port": "7777",
// "path": "vendor/"
// }
}
},
"ajaxOnly": false
};
fileServer.start(serverSettings, transRules);