All Projects → wenlonghuo → xmocker-cli

wenlonghuo / xmocker-cli

Licence: other
为前端提供mock的后台数据,

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to xmocker-cli

kmpapp
👨‍💻 Kotlin Mobile Multiplatform App (Android & iOS). One Code To Rule Them All. MVVM, DI (Kodein), coroutines, livedata, ktor, serialization, mockk, detekt, ktlint, jacoco
Stars: ✭ 34 (+0%)
Mutual labels:  mock
gadgeto
Gadgeto! is a collection of tools that aim to facilitate the development of REST APIs in Go.
Stars: ✭ 38 (+11.76%)
Mutual labels:  mock
definject
Unobtrusive Dependency Injector for Elixir
Stars: ✭ 46 (+35.29%)
Mutual labels:  mock
sinon-mongoose
Extend Sinon stubs for Mongoose methods to test chained methods easily
Stars: ✭ 87 (+155.88%)
Mutual labels:  mock
vue-admin-better
🚀🚀🚀vue admin,vue3 admin,vue3.0 admin,vue后台管理,vue-admin,vue3.0-admin,admin,vue-admin,vue-element-admin,ant-design,vue-admin-beautiful-pro,vab admin pro,vab admin plus,vue admin plus,vue admin pro
Stars: ✭ 12,962 (+38023.53%)
Mutual labels:  mock
electron-mock-ipc
Mock Electron's ipcMain, and ipcRenderer
Stars: ✭ 21 (-38.24%)
Mutual labels:  mock
IOS-CoreBluetooth-Mock
Mocking library for CoreBluetooth framework.
Stars: ✭ 142 (+317.65%)
Mutual labels:  mock
Rubicon
Swift parser + mock generator
Stars: ✭ 42 (+23.53%)
Mutual labels:  mock
FireMock
Mock and stub HTTP requests. Test your apps with fake data and files responses.
Stars: ✭ 25 (-26.47%)
Mutual labels:  mock
jest-dynalite
Jest preset to run Dynalite (DynamoDB local) per test runner
Stars: ✭ 125 (+267.65%)
Mutual labels:  mock
electron-admin-element-vue
Electron Vue3.x Element-UI Admin
Stars: ✭ 37 (+8.82%)
Mutual labels:  mock
vue-admin-work
🎉🎉🚀🚀🚀🚀vue-admin-work是一个中后台系统管理方案。使用 vue2.x 及周边全家桶工具开发而来。支持多种功能,不同角色权限🚀🚀🚀🎉🎉
Stars: ✭ 74 (+117.65%)
Mutual labels:  mock
clj-http-fake
Helper for faking clj-http requests.
Stars: ✭ 124 (+264.71%)
Mutual labels:  mock
h-blog
vue+elementUI模仿我的博客,简单的写的几个练习页面
Stars: ✭ 14 (-58.82%)
Mutual labels:  mock
hex-example
Little API to demonstrate various microservice design principles and technologies
Stars: ✭ 131 (+285.29%)
Mutual labels:  mock
network-monitor-ios
Network Monitor SDK for iOS
Stars: ✭ 70 (+105.88%)
Mutual labels:  mock
laika
Log, test, intercept and modify Apollo Client's operations
Stars: ✭ 99 (+191.18%)
Mutual labels:  mock
swagger-to-mock
Mock data generator CLI for Swagger3 (OpenAPI 3)
Stars: ✭ 49 (+44.12%)
Mutual labels:  mock
jmeter-k8s-starterkit
Ultimate starterkit for JMeter in Kubernetes. WIth live test reporting, JMeter monitoring, kubernetes monitoring and mock as a service
Stars: ✭ 40 (+17.65%)
Mutual labels:  mock
wiresham
Simple TCP service mocking tool for replaying https://www.wireshark.org and http://www.tcpdump.org captured service traffic
Stars: ✭ 44 (+29.41%)
Mutual labels:  mock

Build Status

前端mock用工具

介绍

本工具是定制的mock服务工具,主要针对的是特殊API进行的设置。特色:

  • 定义API使用WEB页面操作

  • API添加不仅依赖于URL链接,而是支持从输入参数中判断所属的API名称

  • 使用nodejs和Koa的function进行条件判断,可针对不同的数据返回自定义的结果

  • 使用本地文件数据库nedb,整个环境仅依赖于nodejs环境

  • 提供文件服务器,可执行gulp类型的构建,并提供页面刷新及url展示接口

说明

相比于 rap �和 yapi 等服务器类型的 Mock 服务, 本�仓库定位于工具服务, 由于使用了本地的�数据库,其单个库最大数据读取为 256M,所以不适合大量的 API 存储。 相比于服务器类型,主要侧重于编辑的灵活和自由,去中心化,避免多人编辑相互影响的问题, 同时也造成了 api 数据过于离散,API 数据交换相对麻烦一些。配合 webpack 的 proxyTable,使用更为方便一些。

Install

   git clone https://github.com/wenlonghuo/xmocker-cli
   cd xmocker-cli
   npm link --production

npm i -g xmocker-cli

使用

打开网页 http://localhost:6001 即可访问 在网页中添加完成项目相关的信息后,可使用命令进行启动对应的项目 命令:mocker

  Usage: mocker [options] [command]


  Options:

    -V, --version  output the version number
    -h, --help     output usage information

  Commands:

    start <proj>    启动项目
    stop <proj>     停止项目
    restart <proj>  重启项目
    list            列出项目
    exit            退出项目
    free <port>     杀掉指定端口
    here            在当前目录启动服务器,更多参数请使用 mocker here -h查看
    help [cmd]      display help for [cmd]

代理转发: 在输出处理函数中填入

const url = `${this.origin}${this.originalUrl.replace(this.path, '/url/new')}`
return this.tool.axios.get(url).then(res => res.data)

schema 使用的是json-gate https://github.com/oferei/json-gate

修改的项目
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].