Code Monkey home page Code Monkey logo

abtest's Introduction

abtest

一个预防测试代理环境。

特性

  • 命令方式
  • 配置创建

安装

npm i -g abtest

使用

初始化

abtest init [--force]
# --force 强制

创建代理服务器

abtest serve <serveName> [--port=3000] [--signal=start|stop]

代理服务

abtest link [serveName] [--port=3002]
# 连接到serveName服务
# 我们可以直接创建 `abtest.config.js` 来写入配置

配置

我们在项目里创建 abtest.config.js 配置文件

module.exports = {
  serve: "qxg-app",
  name: "test1",
  port: 3002,
};

这个例子是将创建一个代理连接到 qxg-app,name 是 test1 ,代理端口号是 8080

设置头

完成上面后,我们需要在前端的请求库设置 headers['x-abtest'] = 'test1' 来进行代理。

关于

MIT

abtest's People

Contributors

lydanne avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.