add autoupdate script for server

This commit is contained in:
2020-04-17 22:08:53 +02:00
parent 0b4e1ab541
commit 3383bf8e14

13
update.sh Normal file
View File

@@ -0,0 +1,13 @@
BACKENDID = netstat -tulpn 2>/dev/null | grep ":3001 " | awk '{print $7;}' | cut -d "/" -f1
kill -9 $BACKENDID
git checkout master &&
git pull &&
cd backend
npm i
cd ../frontend
npm i
npm run build
mv ./build/*
../backend/frontend
cd ../backend
npm start