Basic use and local installation of EasyMock

1. EasyMock data interface

1.1 what is EasyMock

Easy Mock is a visual service that can quickly generate simulation data. It is an online Mock service produced by Hangzhou big search car wireless team, which is extremely simple, efficient, visual and can quickly generate simulation data. Now easy Mock has built-in Mock JS, we can forge data more happily.

Official website:


1.2 basic use of easymock

1.2.1 login or registration

visit After, click start and enter the user name and password. If it does not exist, it will be registered automatically.

Note: there is no password retrieval function, please remember the password!

After successful login, jump to the following page:

1.2.2 create project

Lower right corner + icon to create project:

Create successful renderings:

1.2.3 interface configuration

  1. Create an interface and click the item in the lower left corner.

  2. Enter the project workbench page and click Create interface

  3. In the left edit window, enter mock JS code. Method, Url, description and other information are defined on the right.

  4. Write your own mock JS code

  5. Select the request method, URL and description in the right window, and then click create

  6. After creation, jump to the following page

1.2.4 interface test

  1. Preview interface and copy interface address on the right side of the interface

  2. Modify and clone interfaces and delete interfaces

2. EasyMokc local deployment

reference resources:

Download and install node.2

Install node js v8. X (Note: v10.x is not supported)

reference resources:

2.1.1 download node


2.1.2 unzip the installation package

tar xf node-v8.11.1-linux-x64.tar.xz
mv node-v8.11.1-linux-x64.tar.xz /usr/local/node

2.1.3 adding environmental variables

 vi /etc/profile

Write the following:

export NODE_HOME=/usr/local/node
export PATH=$NODE_HOME/bin:$PATH

Make it effective:

source /etc/profile
ln -s /usr/local/node/bin/node /usr/bin/node
ln -s /usr/local/node/bin/npm /usr/bin/npm
ln -s /usr/local/node/bin/npx /usr/bin/npx

Check for successful installation:

node -v

2.2 installation of Monogodb

2.2.1 add yum source of Monogodb

vi /etc/yum.repos.d/mongodb-org-3.2.repo

Add the following:

name=MongoDB Repository

Generate cache:

yum makecache

2.2.2 installation of monogodb

yum install -y mongodb-org-server

2.2.3 start monogodb

systemctl start mongod.service

2.2.4 check whether it starts normally

systemctl status mongod.service
lsof -i:27017

2.3 installing Redis

3.3.1 installation of epel warehouse

yum install epel-release

2.3.2 installing Redis

yum install -y redis

2.3.3 start Redis

systemctl start redis.service

2.3.4 check whether it starts normally

systemctl status redis.service
lsof -i:6379

2.4 local deployment EasyMock

2.4.1 download project code

git clone

2.4.2 installation project dependency

 cd easy-mock
 npm install

Project construction

npm run build

2.4.4 start up project

npm run start

2.4.5 check whether it starts normally

lsof -i:7300

3. Domain name resolution and SSL certificate configuration

3.1 domain name resolution

After the corresponding domain name supplier purchases the domain name, real name authentication and filing, it can be parsed and used normally.

3.2 SSL certificate

certbot is recommended!!!

To install certbot on Nginx on CentOS7:

3.3 final effect

Tags: Front-end

Posted by Seona on Sat, 21 May 2022 16:22:50 +0300