app.listen now after creation of event

schema is now created before app.listen