Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/danet/src/deps.ts>Router#routes

The most mature backend framework for Deno
Go to Latest
method Router.prototype.routes
import { Router } from "https://deno.land/x/danet@1.7.4/src/deps.ts";

Return middleware that will do all the route processing that the router has been configured to handle. Typical usage would be something like this:

import { Application, Router } from "https://deno.land/x/oak/mod.ts";

const app = new Application();
const router = new Router();

// register routes

app.use(router.routes());
app.use(router.allowedMethods());
await app.listen({ port: 80 });