Easy-mock to start with Nodejs, you need to install Nodejs first
Install--silent--location https:///rpm.nodesource.com/setup_8.x | bash-yum Install node
Easy-mock relies on MONGO and redis to ensure that the server has MONGO and Redis installed and can be installed by Docker
Installing Docker
Install Docker.iocentos System: Yum Install Docker
Installing MONGO
27017:27017 -D MONGO
Installing Redis
6379:6379 -D Redis
Easy-mock code on GitHub, you'll need to install the Git tool to pull the replacement code
Install Gitcentos System: Yum Install git
Pull down the Easy-mock code from GitHub
CD/Homegit clone https://github.com/easy-mock/easy-mock.git
The code is downloaded to the/home/easy-mock directory after the run is finished.
Download NPM-Related dependency packages
cd/home/easy-Install
There is a problem with using node to run Easy-mock directly, Easy-mock is running in the foreground, and if the session exits, the process exits. To ensure that the process runs continuously, you can use the PM2 background to start the process.
Installing PM2
Install pm2-g
Start Easy-mock
cd/home/easy-mockpm2 start app.js
Local Build Easy-mock