Home >Topics >Pagoda Panel >An article explains how to deploy node projects in Pagoda Panel

An article explains how to deploy node projects in Pagoda Panel

藏色散人
藏色散人forward
2021-10-29 15:41:2712070browse

This article is provided by the Pagoda Panel tutorial column to introduce how to deploy the node project in the Pagoda Panel. I hope it will be helpful to you if you need it!

An article explains how to deploy node projects in Pagoda Panel

Pagoda panel deployment node project

1. Preparation:

Nginx operating environment

PM2 Manager

I used the apache environment without success before. I hope everyone can ask more questions and make progress together!

2. Pack all the files into a compressed package, create a new site in the Pagoda Panel website management, take apimobile.zqwlgzs.top as an example, then upload the compressed package to the folder and unzip it.

3. In the SSH terminal of the Pagoda panel, enter the site folder created in the first step and install the dependent npm i

4. Create a new node program (the port will be automatically obtained from the project code)

An article explains how to deploy node projects in Pagoda Panel

5. Domain name reverse generation

Perform the following operations in the website configuration file

(1) Change listen 3000 to listen 80

(2) Then add

location / {
    proxy_pass http://127.0.0.1:3000;
}

An article explains how to deploy node projects in Pagoda Panel

under the server_name domain name

The above is the detailed content of An article explains how to deploy node projects in Pagoda Panel. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:juejin.im. If there is any infringement, please contact admin@php.cn delete