Skip to content

Instantly share code, notes, and snippets.

@boucher
Created April 23, 2015 17:20
Show Gist options
  • Save boucher/91c27b75d87ebb7cefee to your computer and use it in GitHub Desktop.
Save boucher/91c27b75d87ebb7cefee to your computer and use it in GitHub Desktop.
# file run.sh
#!/bin/bash
if [ "$DEPLOY_ENV" == "development" ]; then
# refresh npm modules
mkdir -p /tmp/packages
cp /app/package.json /tmp/packages/
cp /app/npm-shrinkwrap.json /tmp/packages/
cd /tmp/packages
npm install
cd /app
rm -rf ./node_modules
cp -R /tmp/packages/node_modules ./node_modules
# run server
NODE_PATH=./modules npm run watch
else
NODE_PATH=./modules npm start
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment