Add before and after for listen

Useful for websocket which needs to be instantiated with `app.http`.