Conditional start of server


I want to pre validate some conditions and only if all pass through i want to start the server or else stop the server with the message.

I tried implemention it in start/hooks.js ==> hooks.before.httpServer(async () => {
if(conditionFails) {
throw Error(“Condition fails server stopping”)

but even after throwing the error, server continue to start.

any ideas on how to implement it.



Does this help