deno中间件有没有类似node的express().use方法功能?

import { Router } from "https://deno.land/x/oak/mod.ts";
const router = new Router();

import { toRouter } from "../Service/index.js";

router.get("/", (context) => {
  context.response.body = "Hello 路飞!!";
});

router
  .get("/1.1/classes/garden", toRouter)
  .post("/1.1/classes/garden", toRouter)
  .get("/1.1/classes/garden/:id", toRouter)
  .put("/1.1/classes/garden/:id", toRouter)
  .delete("/1.1/classes/garden/:id", toRouter);

以上deno中间件有没有类似node的express用法:
app.use("/1.1/classes/garden", require("./api/garden"));

const router = express.Router();
router.get("/",async (req, res)=>{} );
router.get("/:id",async (req, res)=>{} );
router.post("/",async (req, res)=>{} );等等路径只需要写一次,改动也方便

koajs/router: Router middleware for koa. (github.com)

deno环境下写呀,您发的这个好像适合node环境下,需要npm下载,deno不直接支持吧

oak 内置的 router 和 koa 的 api 一样(除非新版本修改了 api)

const express = require("express");
const app = express();

const gardenRouter = express.Router();

gardenRouter.get("/", (req, res) => {

   console.log("获取所有小区");

   res.send("获取所有小区");

});

gardenRouter.get("/:id", (req, res) => {

   console.log("获取某个小区");

   res.send("获取某个小区");

});

// ...

app.use("/api/garden", gardenRouter);

Oak的写法应该是?

import { Application, Router } from "https://deno.land/x/oak/mod.ts";
const app = new Application();
// 怎么写?
app.use("/api/garden", );

https://deno.land/x/oak@v10.0.0/examples/routingServer.ts