Created custom variation of runServer that exits when the response has been received.