Created
July 7, 2011 21:40
-
-
Save andyvanee/1070612 to your computer and use it in GitHub Desktop.
Makefile for node test and run
This file contains hidden or 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
| .PHONY: test | |
| test: | |
| @ echo ### App Server Starting; echo | |
| @ node app.js >> tst_log.txt 2>&1 & | |
| @ echo; echo '### Running Zombie Tests'; echo | |
| @ sleep 1; node test-http/zombie_tests.js | |
| @ echo; echo '### Shutting Down App Server'; echo | |
| @ killall node | |
| @ rm tst_log.txt | |
| @ echo; echo '### Running nodeunit Tests'; echo | |
| @./run_tests.js | |
| run: | |
| @ sudo pwd ##Prompt for sudo password, so the following will succeed | |
| @ sudo killall node > log.txt 2>&1 & | |
| @ sleep 0.4; sudo NODE_ENV=production node app.js 80 >> log.txt 2>&1 & | |
| @ echo Node server running on port 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment