added cookieadapter, startup is now start, pass now a setupMiddlewares function to setup the middlewares before the actual routes to the router are created