让egg的npm run dev运行在后台

129 阅读1分钟
  1. 执行命令
$ nohup npm run dev >/dev/null 2>&1 & exit
  1. 通过lsof查询pid号
$ lsof -i:7001
  1. 将后台程序关掉
$ kill pid号