前提安装homeBrew,https://blog.csdn.net/kongduxue/article/details/105125434
1.安装redis
https://blog.csdn.net/kongduxue/article/details/105125262
2.安装mongodb
https://blog.csdn.net/kongduxue/article/details/105124125
3.git克隆(clone)项目easy-mock到本地
git clone https://github.com/easy-mock/easy-mock.git
4.安装node,node版本必须是v8开头的,
npm install -g n //node版本切换工具n,对其全局安装
n ls-remote //查看可安装的所有版本
n 8.6.0 // 输入n和版本号,可以安装特定版本的node
n ls //查看本地安装版本
n //查看安装的所有node版本,上线箭头切换需要选择的版本,这里选择8开头的版本
以上操作完步,环境就安装好了,开始启动服务
//1.启动redis
redis-serve
//能看到以下界面,启动成功
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 5.0.7 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 85571
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
85571:M 26 Mar 2020 17:58:21.287 # Server initialized
85571:M 26 Mar 2020 17:58:21.287 * Ready to accept connections
//2.启动mongodb
mongod
//3.在clone的easy-mock的目录下,安装依赖,启动服务
npm install
npm run server
//启动成功会有一个地址,直接在浏览器打开就行
server started at http://0.0.0.0:7300