1234567891011121314151617181920212223 |
- #!/bin/bash
- sed -i 's|localhost|'"${DBHOST}"'|g' hello.js
- sed -i 's|mongodb//.*/hello_world|mongodb//'"${DBHOST}"'/hello_world|g' hello.js
- export NODE_ENV=production
- export NVM_HOME=${IROOT}/nvm
- # Used to avoid nvm's return 2 error.
- # Sourcing this functions if 0 is returned.
- source $NVM_HOME/nvm.sh || 0
- nvm install 0.10.8
- nvm use 0.10.8
- npm install
- node hello.js &
- # !DO NOT REMOVE!
- #
- # It takes `node app` a few seconds to turn on and
- # then fork. If you remove this sleep, the parent shell
- # executing this script will be terminated before the
- # application has time to awaken and be forked, and
- # express will fail to be started
- sleep 5
|