setup.sh 340 B

1234567891011121314151617
  1. #!/bin/bash
  2. sed -i 's|localhost|'"${DBHOST}"'|g' app.js
  3. export NODE_ENV=production
  4. export NVM_HOME=${IROOT}/nvm
  5. # Used to avoid nvm's return 2 error.
  6. # Sourcing this functions if 0 is returned.
  7. source $NVM_HOME/nvm.sh || 0
  8. nvm install 0.10.8
  9. nvm use 0.10.8
  10. # update npm before app init
  11. npm install -g npm
  12. # run app
  13. npm install
  14. node app &