1.0.6 • Published 3 years ago

xys-web-shk v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

介绍

web项目适配eggjs本地开发的插件。 当页面链接的协议为https或者http 并且 域名为localhost或者IP+端口 形式的请求,将会走 替换 host域名 和 port端口号 的逻辑。

安装

# 一般是开发阶段使用
npm i xys-web-shk -D

快速上手

import xysWebShk from 'xys-web-shk'

/**
 * host: {string}需要替换成的域名
 * port: {string}需要替换成的端口号
 * exclude: {string[]|RegExp[]}不需要替换的接口白名单
 */
xysWebShk({ host: 'dev-internal.xinhulu.com', exclude: ['/user/login', /^CRM/], port: '80' })

贡献代码

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago