1.0.5 • Published 7 years ago

wns-http-proxy v1.0.5

Weekly downloads
8
License
MIT
Repository
github
Last release
7 years ago

wns-http-proxy

wns-http-proxy是用来做简单的http/https请求转发

Installation

npm install wns-http-proxy --save

Use Cases

    const wnsHttpProxy = require('wns-http-proxy');
    
    let proxyServer = wnsHttpProxy.createServer({
        port: 80,
        root: '/home/wannasky/workspace/test/'
    });
    
    proxyServer.setLocation({
       'test.baidu.com': {
           root: 'D:/workspace/github-workspace/test/',                   
           '/index': '/index.html',
           '/api': 'http://apistore.baidu.com/api/',                       
           '/service': {
               root: 'D:/workspace/github-workspace/test/',                
               '/user': 'http://apistore.baidu.com/service/user'
           }
       },
       
       ...
    });
1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago