server_update.sh 520 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. cd /space/YellowLabTools
  3. # Stop the server
  4. forever stopall
  5. # Keep the settings.json file
  6. git stash
  7. git pull
  8. git stash pop
  9. # In case something was added in package.json or bower.json
  10. rm -rf node_modules
  11. npm install
  12. rm -rf bower_components
  13. bower install --config.interactive=false --allow-root
  14. # Front-end compilation
  15. rm -rf front/build
  16. npm install grunt-cli -g
  17. npm install phantomjs -g
  18. grunt build
  19. # Restart the server
  20. NODE_ENV=production forever start -c "node --stack-size=65500" bin/server.js