Modified app so that the server would run only after a successful DB initialization.