Skip to content

Instantly share code, notes, and snippets.

@netmilk
Created October 8, 2013 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netmilk/6885031 to your computer and use it in GitHub Desktop.
Save netmilk/6885031 to your computer and use it in GitHub Desktop.
Shell script to run express app on background, run API test and, kill app and return exit status from the test runnure
#!/bin/sh
./node_modules/coffee-script/bin/coffee app.coffee &
sleep 5
PID=$!
dredd apiary.apib http://localhost:3000/
RESULT=$?
kill -9 $PID
exit $RESULT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment