adds socket.io resource to test files
moves process exit code to lib/app