当前位置:网站首页>在服务器上运行node流程
在服务器上运行node流程
2022-07-30 00:58:00 【淼清风】
安装ndoe
- 下载
weget node压缩文件地址
- 解压缩
tar -xvf 压缩文件名
- 查看node
cd node文件目录
- 建立软连接
ln -s nodebin文件路径 全局bin文件路径
ln -s npmbin文件路径 全局bin文件路径
运行node
普通运行
node 文件路径
持续运行
- 安装forever
npm install forever -g
- 执行forever命令
forever start 文件路径
- 停止运行
forever stop 文件路径
node进程管理PM2
- 安装2
npm install pm2 -g
- 启动node任务
pm2 start index.js
其他PM2命令
# 重启指定任务,0代表任务的索引
pm2 restart 0
# 重启所有任务
pm2 restart all
# 停止指定任务
pm2 stop 0
# 停止所有任务
pm2 stop all
# 删除指定任务
pm2 delete 0
# 删除所有任务
pm2 delete all
边栏推荐
- Google Chrome (google) is set to translate Chinese, the translation option does not take effect or the translation option does not pop up
- 9 common mistakes testers fall into
- 循环神经网络(RNN)
- 裁员趋势下的大厂面试:“字节跳动”
- How many ways does Selenium upload files?I don't believe you have me
- "The lighthouse factory" of China path: smart roll out from point to surface
- Fabric 私有数据案例
- 泰克Tektronix示波器软件TDS1012|TDS2002|TDS2004上位机软件NS-Scope
- How Filebeat ensures that the log file is still correctly read when the log file is split (or rolled)
- LeetCode / Scala - 无重复字符最长子串 ,最长回文子串
猜你喜欢

Navicat for mysql破解版安装

The range of motion of the robot

exness: U.S. GDP shrinks, yen bounces back

Detailed explanation of nacos cluster configuration

自学HarmonyOS应用开发(56)- 用Service保证应用在后台持续运行

Reconstruction of binary tree

自学HarmonyOS应用开发(47)- 自定义switch组件

i.MX6U-driver development-3-new character driver

News text classification

Vmtouch - under Linux file cache management artifact
随机推荐
1592. 重新排列单词间的空格
SSM整合案例
【mysql】Mysql公用表表达式with as
KDE Frameworks 5.20.0: Plasma welcomes many improvements
Detailed introduction of @RequestParam annotation
旋转数组的最小数字
3 tips for using hot events to create press releases?A must-see for self-media people
Missing X64 mfc140u. DLL file - > application cannot normal boot (0 xc000007b) solution
专心致志做事情
STM32——OLED显示实验
Worthington Enzymatic Cell Harvest & Cell Adhesion and Harvest
TCP/IP 常见问题
557. 反转字符串中的单词 III
【LeetCode每日一题】——872.叶子相似的树
什么专业越老越吃香?
更换可执行文件glibc版本的某一次挣扎
【Flutter】Flutter inspector 工具使用详解,查看Flutter布局,widget树,调试界面等
Weekly recommended short video: What is R&D efficiency?It can achieve anti "involution"?
某团实习面经
Nacos micro service ~ Nacos 】 【 configuration of the center