setup.sh 553 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. export NODE_HOME=${IROOT}/node-v0.10.8-linux-x64
  3. sed -i 's|localhost|'"${DBHOST}"'|g' app.js
  4. export NODE_ENV=production
  5. export NODE_HOME=${IROOT}/node-v0.10.8-linux-x64
  6. export PATH=$PATH:$NODE_HOME/bin
  7. ${NODE_HOME}/bin/npm install
  8. ${NODE_HOME}/bin/node app &
  9. # !DO NOT REMOVE!
  10. #
  11. # It takes `node app` a few seconds to turn on and
  12. # then fork. If you remove this sleep, the parent shell
  13. # executing this script will be terminated before the
  14. # application has time to awaken and be forked, and
  15. # express will fail to be started
  16. sleep 5