App starts to work after mongoose connection