Express setup function, middleware setup, events emit