setup.sh 504 B

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