Updating example to use Server instead of middlewares