moved public and static serving to middlewares