exit if mock servers fail to start

This commit is contained in:
Brian Gough 2017-10-20 15:24:58 +01:00
parent 67be2feb23
commit dacc7ebabb
3 changed files with 10 additions and 0 deletions

View file

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

View file

@ -31,6 +31,10 @@ module.exports = MockDocUpdaterApi =
app.listen 3003, (error) ->
throw error if error?
.on "error", (error) ->
console.error "error starting MockDocUpdaterApi:", error.message
process.exit(1)
MockDocUpdaterApi.run()

View file

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