Node.js deployment
Simple node js deployment
1)git clone
2)ps -ef|grep server.js|kill
3)cd /root/abc-ccc/abc-ccc-api
4)npm install
5)nohup node server.js &
/usr/bin/node /root/abc-ccc/abc-cccPortal-API/abc-cccPortal-API/server.js &
git clone [email protected]:Deltaabc/abc-cccPortal-API.git
node=ps -ef|grep server.js |awk '{print $2}'|head -n 1
kill -9 $node || true
mv /root/abc-ccc/abc-cccPortal-API /root/abc-ccc/abc-cccPortal-API-date +%F%s
|| true
cp -r /opt/workspace/abc-cccPortal-API /root/abc-ccc
pushd /root/abc-ccc/abc-cccPortal-API/abc-cccPortal-API
npm install
rm -rf /root/abc-ccc/abc-cccPortal-API/abc-cccPortal-API/node_modules
pushd /root/abc-ccc/abc-cccPortal-API/abc-cccPortal-API
npm install
#daemonize -E BUILD_ID=dontKillMe /usr/bin/nohup /usr/bin/node server.js &
#/usr/bin/bash /opt/node.sh >>/opt/node-1.log 2>&1
#node server.js >>server.log 2>&1 &
systemctl start nodeserver.service
echo "The build is completed"
Congratulations @vijaay! You have received a personal award!
1 Year on Steemit
Click on the badge to view your Board of Honor.
Congratulations @vijaay! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!