Created
December 11, 2013 03:59
-
-
Save ryanlelek/7904889 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, run your node script with nohup | |
# (keep the "&" at the end, it puts the process in teh background) | |
nohup node server/index.js --port 8443 & | |
# Now we capture the process ID so we know what to kill later | |
export SERVER_PID=$!; | |
echo $SERVER_PID; | |
# Sleep 5 Seconds to allow the server script time to startup | |
# Adjust to your needs | |
sleep 5; | |
# Run the tests | |
npm test; | |
# Kill the Server | |
kill $SERVER_PID; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment