added array for websocket middleware
refactored example, so that we don't have to call a function, and got rid of unnecessary app.listen in www
added example in angularjs