xys-web-shk
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

介绍

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' })

贡献代码

Readme

Keywords

none

Package Sidebar

Install

npm i xys-web-shk

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

12 kB

Total Files

11

Last publish

Collaborators

  • mucfe