setup.sh 414 B

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