Skip to content

express开篇

安装express

$ mkdir myapp
$ cd myapp
$ npm init

使用模版

https://github.com/edwinhern/express-typescript

使用pm2 部署

bash
$ npm i -g pm2
$ pm2 -v


pm2 start ecosystem.config.js
pm2 stop walle-ci-runner-node
pm2 status
pm2 kill


# 生成开机启动脚本
pm2 startup
 
# 保存当前进程列表
pm2 save
bash

# 查看实时日志
pm2 logs express-api --lines 100
 
# 平滑重启(零 downtime)
pm2 reload express-api

https://blog.csdn.net/gitblog_00500/article/details/151107723

最近更新