shell脚本启动node服务
#!/bin/bash
cd /root/dev-web
source /etc/profile
/usr/local/node-8.11.1/bin/npm i && EGG_SERVER_ENV=dev npm run devstart
sleep 5
nodeport=` netstat -lntp|grep "7000"|awk '{print $4}'|awk -F":" '{print $4}'`
echo $nodeport
if [ "$nodeport" ];then
echo -e "\033[32m[ node process start success on dev env ! ]\033[0m"
fi

浙公网安备 33010602011771号