当前位置:网站首页>Easy mock local deployment (you need to experience three times in a crowded time. Li Zao will do the same as me. Love is like a festival mock)
Easy mock local deployment (you need to experience three times in a crowded time. Li Zao will do the same as me. Love is like a festival mock)
2022-04-23 19:19:00 【"Technology makes customers"】
Preface
Many little partners asked me how to add configuration to my company's projects mock, stay vue Everyone in the project knows how to configure mock, In large-scale front-end projects, I was confused .
I'll answer him , You'll be here today vue In the project , I changed the company that day with angular、react,webix… wait
Still not configured to use mock, It's recommended easymock,
All front-end projects can be used, whatever you jb frame , It's all done ojbk. Someone asked ,easymock, Why deploy locally , Can't you use it online ?( Of course. , Everything you say is right )
There are several reasons
- 1 easymock The official website often hangs , Cause development progress to stop ( If you can't finish the task, wait for overtime )
- 2 Some partners are outsourcing companies , You can't use the Internet (mmp There is no Internet , How do I Google program ?)
- 3 In case of that day easymock Lost your important information ( It's no use suing him )
Quick start ( The bus to kindergarten is leaving , Get in the car and fasten your seat belt )
Before we start , Suppose you have successfully installed Node.js(>= v8.9)& MongoDB(>= v3.4)& Redis(>= v4.0).
MongoDB Installation tutorial :http://www.runoob.com/mongodb/mongodb-window-install.html
Redis Installation tutorial :http://www.runoob.com/redis/redis-install.html
tips tip
- node.js and mongodb When installing, it is always next Just go down .
- redis It's a compressed package , Just unzip it
Check if the installation is successful
- node.js It works npm It was successful , Or output node edition
- mongodb Find the installed folder ( Generally, the default is
C:\Program Files\MongoDB\Server\4.0\binInside ), double-click mongo.exe Input db Carriage return display test The database is successful
- redis Check whether it is successful. See the installation tutorial above for a very simple .
install
$ git clone https://github.com/easy-mock/easy-mock.git
$ cd easy-mock && npm install
The configuration file
find config/default.json, Or create a config/local.json file , Replace the following fields to be replaced with your own configuration .( By default, the configuration file does not need to be modified )
Different environments will load different configuration files , Before that, you should be right node-config Know something about .
{
"port": 7300,//easymock Project start port
"host": "0.0.0.0",
"pageSize": 30,
"proxy": false,
"db": "mongodb://localhost/easy-mock",// You don't need to create your own database , Starting easymock Just create a new interface
"unsplashClientId": "",
"redis": {
"port": 6379,//redis port
"host": "localhost"
},
"blackList": {
"projects": [], // projectId, example :"5a4495e16ef711102113e500"
"ips": [] // ip, example :"127.0.0.1"
},
"rateLimit": { // https://github.com/koajs/ratelimit
"max": 1000,
"duration": 1000
},
"jwt": {
"expire": "14 days",
"secret": "shared-secret"
},
"upload": {
"types": [".jpg", ".jpeg", ".png", ".gif", ".json", ".yml", ".yaml"],
"size": 5242880,
"dir": "../public/upload",
"expire": {
"types": [".json", ".yml", ".yaml"],
"day": -1
}
},
"fe": {
"copyright": "",
"storageNamespace": "easy-mock_",
"timeout": 25000,
"publicPath": "/dist/"
}
}
start-up
$ npm run dev
# visit http://127.0.0.1:7300
At this time, we can open an interface preview at random , Copy url use postman Test interface ok
More requirements configuration , See the official website for details , I don't want more Once said .
Vue Study Group 493671066, Many beauties . Old driver, get in the car , It's too late to explain .
Author correlation Vue article
be based on Vue2.0 Realize the authority control of background system
vue2.0- be based on elementui Skin peeler [ Custom theme ]
VUE2.0 Add, delete, change, check, attach, edit, add model( bounced ) Component sharing
Reward Heartfelt thanks
版权声明
本文为["Technology makes customers"]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210559121080.html
边栏推荐
- FTP, SSH Remote Access and control
- Redis optimization series (III) solve common problems after master-slave configuration
- openlayers 5.0 加载arcgis server 切片服务
- Transaction processing of SQL Server database
- [today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born
- Speculation on the way to realize the smooth drag preview of video editing software
- Openlayers 5.0 reload the map when the map container size changes
- SQL of contention for system time plus time in ocrale database
- Matlab 2019 installation of deep learning toolbox model for googlenet network
- Audio signal processing and coding - 2.5.3 the discrete cosine transform
猜你喜欢

为何PostgreSQL即将超越SQL Server?

2022.04.23(LC_763_划分字母区间)

JVM的类加载过程

剑指 Offer II 116. 省份数量-空间复杂度O(n),时间复杂度O(n)
![[today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born](/img/0a/ed4eab6589e1c072edc247463e889e.png)
[today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born
![[record] typeerror: this getOptions is not a function](/img/c9/0d92891b6beec3d6085bd3da516f00.png)
[record] typeerror: this getOptions is not a function

8266 obtain 18b20 temperature

Common SQL commands

Getting started with vcpkg

mysql通过binlog恢复或回滚数据
随机推荐
Parsing headless jsonarray arrays
Summary of several relationships of UML class diagram
Common SQL commands
Codeworks round 783 (Div. 2) d problem solution
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
Modify the font size of hint in editext
All table queries and comment description queries of SQL Server
SSDB基础
Common processing of point cloud dataset
[advanced level 11 of C language -- character and string functions and their simulation implementation (2)]
[today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born
Wechat video extraction and receiving file path
Using bafayun to control the computer
SSDB foundation 3
SSDB foundation 2
Sword finger offer II 116 Number of provinces - spatial complexity O (n), time complexity O (n)
浅谈c语言指针的强制转换
Translation of audio signal processing and coding: Preface
Some records used by VS2010
arcgis js api dojoConfig配置