README.md 696 Bytes

灰度接口代理

灰度接口服务:

  1. service.api.yohobuy.com
  2. api.open.yohobuy.com

配置:

{
    apis:[
    {
        route:"/service.api.yohobuy.com",//老服务接口域名
        methods:['get','post']

    },
    {
        route:"/api.open.yohobuy.com",//老服务接口域名
        methods:['get','post']
    }
   ],
   whiteList:[
    {
      api:'/guang/api/v1/article/getArticleNotice', //替换老接口
      map:'http://api.douban.com/v2/book/search' //替换新接口
    },
    {
      api:'app.Shopping.count',//替换老接口
      map:'http://127.0.0.1:3000/test' //替换新接口
    }]
}

启动:

npm install 
npm start