Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

easy-mock

> 前端框架
Open source

A persistent service that generates mock data quickly and provids visualization view.

9.0K stars0 likes0 views
WebsiteGitHub

About

A persistent service that generates mock data quickly and provids visualization view.

Thanks to Souche Inc. which provides the server to hold an online service.

Links

  • 简体中文介绍
  • Online Manual
  • Easy Mock CLI - A command line tool to generate an api.js file quickly based on Easy Mock.

Introduction

If you're unable to deploy an Easy Mock service by yourself, the online service is recommended.

Easy Mock is a persistent service that generates mock data quickly and provids visualization view.

Features

  • Support API proxying
  • Convenient shortcuts
  • Support Collaborative editing
  • Support team project
  • Support RESTful
  • Support Swagger | OpenAPI Specification (1.2 & 2.0 & 3.0)
    • Create project quickly based on Swagger
    • Support displaying parameters and the return value
    • Support displaying class model
  • More flexible and extensible in response data
  • Support for custom response configuration (example: status/headers/cookies)
  • Use Mock.js schema
  • Support restc to preview API

Quick Start

Before starting, we assume that you're already have installed Node.js (v8.x, v10.x is not supported) & MongoDB (>= v3.4) & Redis(>= v4.0).

Installation

bash
$ git clone https://github.com/easy-mock/easy-mock.git
$ cd easy-mock && npm install

Configuration

Find config/default.json or create config/local.json to overwrite some configuration.

Easy Mock will load different configuration files according to your environment. Reference to node-config to get more information because Easy Mock uses node-config as its configuration module.

…

Note:

  • The default value of publicPath is '/dist/'. You can replace it to your own CDN if necessary.
  • If you changed some configuration of fe, you should run build command to adapt that changes.

Background:

Easy Mock supports two background service, Unsplash and Bing.

If you leave unsplashClientId blank, the background will be provided by Bing.

Launch

bash
$ npm run dev
# Visit http://127.0.0.1:7300

More Commands

bash
# Build front-end assets
$ npm run build

# Run Easy Mock as production environment (You should run `build` first)
$ npm run start

# Run unit test
$ npm run test

# Test lint
$ npm run lint

Deployment

Please configure your configuration files before this step.

PM2

We're recommending you to use PM2 as your daemon process.

Install PM2 Globally

bash
$ [sudo] npm install pm2 -g

Launch via PM2

You should run build before this step.

bash
$ NODE_ENV=production pm2 start app.js

Releases

Refer to Release and you'll get all the releases and theirs changelog.

Contributing

Easy Mock is now maintained by Mobi-Architecture team of Souche Inc. If you have any question about this project, you're welcome to post Issues or make some Pull Requests. Before contributing, we think you'd better read the contributing guide.

Real-Time Feedback

You may make some real-time feedback via QQ group.

QQ is the most popular IM software in China and you can get it downloaded via http://en.qq.com/.

The QQ group number is 595325417, and here's the QR code of the group:

Who Deployed Easy Mock

If you deployed Easy Mock in your own server, please tell us

  • Souche inc | 大搜车
  • Ruff
  • Qiniu | 七牛
  • Head Spring | 恒达时讯
  • Digital Union | 数字联盟
  • CityTogo | 兔狗家装
  • Mistong | 铭师堂
  • Tuotuo Internet | 妥妥网络
  • Straight flush | 同花顺
  • 360 Enterprise Security | 360企业安全集团
  • MeiTuan | 美团网
  • Wenba. Inc | 上海谦问万答吧云计算科技有限公司 AI学部门
  • PPMoney | 万惠集团
  • Mysoft Yunke | 明源云客
  • GeekPark | 极客公园
  • Enation Soft Co., Ltd | 易族智汇(北京)科技有限公司
  • Harmony Cloud | 杭州谐云科技有限公司
  • China Literature | 阅文集团
  • huodongxing | 活动行
  • kinhom | 金海马商业集团
  • yuntongxun | 北京容联易通信息技术有限公司
  • YHD | 1号店
  • 51NB | 51信用卡
  • Yunlai inc | 云来网络
  • wozaijia | 我在家家居
  • FOR U TRUCKING | 福佑卡车
  • GUANLAN NETWORKS(HANGZHOU) CO.,LTD | 丁香园
  • Bindo Labs Limited
  • Value Simplex | 熵简科技
  • Shanghai Mingyun | 上海明运
  • Feidai | 深圳飞贷金融科技
  • cibfintech | 兴业数字金融
  • 广州三人行壹佰教育
  • bangdao-tech | 邦道科技
  • CGB | 广发银行
  • Budiot | 萌发物联&玖竹科技
  • ZTE | 中兴通讯股份有限公司
  • Envision Digital | 远景智能
  • Jianshu | 简书
  • HYPERS | 宏路数据
  • yunlong tech | 成都云隆科技有限公司
  • taojiujiu tech | 涛舅舅网络科技有限公司
  • shunfeng tongcheng tech | 北京顺丰同城科技有限公司
  • bread finance | 面包财经
  • Jimi | 机蜜
  • zhongan | 众安科技信息技术服务有限公司
  • verystar | 上海费芮网络科技有限公司
  • lanren | 懒人听书
  • IBPS | 广州流辰信息技术有限公司
  • StarZP | 星众派
  • Shijiazhuang banknote printing corporation | 石家庄印钞有限公司
  • Changhong | 长虹
  • bihukeji | 壁虎科技
  • beibeibang | 贝贝帮
  • BiHu | 壁虎科技
  • lifebyte | lifebyte
  • ECNU | 华东师范大学
  • Elemvision | 中科视元科技(杭州)有限公司
  • fenqile | 分期乐
  • efeet | 广州一丈网络科技有限公司
  • Rocoinfo | 大诚若谷
  • ankerjiedian | 街电
  • cloudbae | 云宝宝大数据产业发展有限责任公司

Core Contributors


chuangker

XadillaX

ostoc

xinyu198736

License

GPL-3.0

Issues· 184 open

View all issuesOpen on GitHub
  • #487

    Potential Security Issue

    Updated Mar 10, 2026
  • #485

    项目废弃了 ?

    Updated Jul 30, 2025
  • #483

    哪个版本的mongodb可以兼容啊

    Updated Sep 12, 2024
  • #482

    post方法如何加入请求参数

    Updated Dec 29, 2023
  • #481

    docker安裝各种报错

    Updated Dec 18, 2023
  • #480

    [nodemon] app crashed - waiting for file changes before starting

    Updated Dec 9, 2023
  • #467

    技术要求太高了。入门即放弃系列

    Updated Aug 27, 2023
  • #448

    搭建easymock后,启动预览接口时,报错:Uncaught ReferenceError: hljs is not defined

    Updated Jun 2, 2023
  • #479

    使用mock.js中的increment存在问题

    Updated Jan 11, 2023
  • #430

    Easymock 支持多台服务器配置同一个接口吗?

    Updated Nov 20, 2022

> Tags

JavaScriptdata-generatoreasy-mockjavascriptmock

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架