Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
educg-net-22023-2210132
proj235-3182
Commits
3c8fa94c
Commit
3c8fa94c
authored
1 year ago
by
Z.&.Y
Browse files
Options
Download
Patches
Plain Diff
项目启动流程
parent
b8073827
main
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ManagementPage/readme.md
+35
-0
ManagementPage/readme.md
with
35 additions
and
0 deletions
+35
-0
ManagementPage/readme.md
0 → 100644
+
35
−
0
View file @
3c8fa94c
## 部署流程
### 安装 node.js 环境
1.
安装 node.js
-
下载安装包
> wget https://nodejs.org/dist/v20.14.0/node-v20.14.0-linux-x64.tar.xz
-
解压安装包
> tar -xvf node-v20.14.0-linux-x64.tar.xz
-
配置环境变量
> ln -s _dirname/node-v20.14.0-linux-x64/bin/node /usr/local/bin
> ln -s _dirname/node-v20.14.0-linux-x64/bin/npm /usr/local/bin
`_dirname` 为 node.js 解压目录
1.
测试
> node -v
> npm -v
显示当前版本号
### 安装pm2
1.
安装pm2
> npm install pm2 -g
### 启动项目
1.
进入项目目录
> cd _dirname
1.
安装依赖
> npm install
1.
启动项目
> pm2 start server.js --watch
> pm2 list
1.
查看控制台日志输出
> pm2 logs server
1.
停止项目
> pm2 stop server
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets