mocxykit logo

mocxykit

by shunseven

mocxykit is a middleware for front-end development services, mainly used for proxy requests and MOCK data. It can be used for all development projects that start services with webpack, vite, and other front-end development services.

View on GitHub

Last updated: N/A

What is mocxykit?

mocxykit is a middleware for front-end development that provides proxying and mocking capabilities. It allows developers to intercept and modify API requests and responses, facilitating testing and development.

How to use mocxykit?

mocxykit can be integrated into webpack, vite, express, and vue.config.js projects. Installation is done via npm install mocxykit --save-dev, and then configured within the respective framework's configuration files as shown in the README examples.

Key features of mocxykit

  • Proxy requests and MOCK data

  • Visual management of MOCK data and proxy functions

  • Global and custom URL proxy support

  • Dynamic switching between proxy and MOCK data

  • Faker random MOCK data generation

  • Multi-environment variable management

  • Ngrok public network access

  • Automatic synchronization of ApiFox documentation and generated mock data

  • MCP protocol support for AI programming

  • Built-in API request tool

Use cases of mocxykit

  • Simulating different API responses for testing

  • Developing front-end applications without a fully functional back-end

  • Debugging API integrations

  • Demonstrating application functionality to clients

  • AI programming with automated mock data retrieval

FAQ from mocxykit

How do I install mocxykit?

Run npm install mocxykit --save-dev in your project directory.

How do I configure mocxykit with Webpack?

Refer to the Webpack configuration examples in the README. You'll need to add the WebpackProxyMockPlugin to your plugins array and configure the apiRule.

Can I use mocxykit with Vite?

Yes, use the viteProxyMockPlugin in your vite.config.js file. See the README for an example.

How do I access the configuration UI?

By default, the configuration UI is available at http://localhost:3000/config. For vite projects, a button will appear on the page to open the configuration page.

How do I sync ApiFox data?

In the configuration UI, click the 'Sync ApiFox Data' button and provide your ApiFox Access Token and project details.