Skip to content

Instantly share code, notes, and snippets.

@Unitech
Created October 11, 2014 13:45
Show Gist options
  • Save Unitech/32ebb78f4ce079bcab97 to your computer and use it in GitHub Desktop.
Save Unitech/32ebb78f4ce079bcab97 to your computer and use it in GitHub Desktop.
test.sh
#!/usr/bin/env bash
set -o verbose
pm2 kill
rm -rf hapi_playground
git clone git://github.com/atomantic/hapi_playground.git
cd hapi_playground
npm install
sleep 1
pm2 start process.json
sleep 4
curl -m 5 http://localhost:46100
sed -i 's/Hello Hapi/Hello Hapi 1/' index.js
sleep 4
curl -m 5 http://localhost:46100
sed -i 's/Hello Hapi 1/Hello Hapi 2/' index.js
sleep 4
curl -m 5 http://localhost:46100
pm2 kill
cd ../
rm -rf hapi_playground;
git clone git://github.com/atomantic/hapi_playground.git
cd hapi_playground
npm install
pm2 start process.json
sleep 4
curl -m 5 http://localhost:46100
sed -i 's/Hello Hapi/Hello Hapi 1/' index.js
sleep 4
curl -m 5 http://localhost:46100
sed -i 's/Hello Hapi 1/Hello Hapi 2/' index.js
sleep 4
curl -m 5 http://localhost:46100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment