Local Build Easy-mock

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.