Check database before running server