exit if mock servers fail to start

This commit is contained in:
Brian Gough 2017-10-20 14:56:12 +01:00
parent 5bf2cb6374
commit 448f131011
2 changed files with 6 additions and 0 deletions

View file

@ -15,6 +15,9 @@ module.exports = MockTrackChangesApi =
app.listen 3015, (error) ->
throw error if error?
.on "error", (error) ->
console.error "error starting MockTrackChangesApi:", error.message
process.exit(1)
MockTrackChangesApi.run()

View file

@ -40,6 +40,9 @@ module.exports = MockWebApi =
app.listen 3000, (error) ->
throw error if error?
.on "error", (error) ->
console.error "error starting MockWebApi:", error.message
process.exit(1)
MockWebApi.run()