On Site / Premises
Install Node JS
-
Download and install Node JS using the link provided Download Link
- Start CMD with administrator privileges.
- Globally installed PM2:
npm install -g yarn
Install MxB TV Dependencies
- Go to the parent folder of the MxB TV project.
- Start CMD with administrator privileges.
- Then run the command below to install the project dependencies.
yarn
Install PM2
- Start CMD with administrator privileges.
- Globally installed PM2:
npm i pm2 -g
Then set up PM2 to boot from start:
-
Install and configure:
npm i -g pm2-windows-service
- Add system environment variable: PM2_HOME = C: \ users \ *** . PM2 (specific path can be viewed by PM2 -V)
-
Open a new CMD window with administrator privileges, perform the following command to install the service:
pm2-service-install
-
To start the MxB TV server run the following command in the CMD with administrator privileges, enter the corresponding application directory:
pm2 start npm --name "You have to get the name" - run start
If your run status is: Online, it means normal.
Setup IIS
-
Open IIS -> Selected Server Name -> Double-click the Application Request Routing Cache -> clicking on the right function view IIS node -> Click on the server proxy settings -> check box in the ENABLE PROXY
-
Add MxB TV, directory Select the MxB TV project folder, configure the project domain name
-
Then check the Test website, select the URL rewrite, add a rule
Mode: ^ (. *)
Condition: {http_host} ^ www.xxxx.com (your domain) $
Rewrite URL: http: //127.0.0.1: 3000 / {R: 1} Your MxB TV configuration of the address and port