setup.sh 468 B

12345678910111213141516171819
  1. #!/bin/bash
  2. sed -i 's|localhost|'"${DBHOST}"'|g' app.js
  3. export NODE_ENV=production
  4. export NODE_HOME=${IROOT}/nvm/v0.10.8
  5. export PATH=$PATH:$NODE_HOME/bin
  6. # run app
  7. npm install
  8. 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