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