createServer used to accept middleware, to be mounted at /. In fact, a lot of the included examples try to use this functionality, but are right now broken.
createServer() should accept middleware.
In 2.x we can break a few little things like this, it was a bad idea from the beginning, you can't manipulate it progressively and you have no access to mounting so it's inevitable that you'll have to break it out into .use() calls at some point
I concur, but then, should the examples be fixed instead? I'm thinking there's no real loss in accepting middleware in createServer, and we keep a small bit of backwards compat.
yup they definitely need updates, i only had time to update the session ones since i was testing stuff anyway