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

x/superdeno/test/deps.ts>Oak.Router#routes

Super-agent driven library for testing Deno HTTP servers.
Go to Latest
method Oak.Router.prototype.routes
import { Oak } from "https://deno.land/x/superdeno@4.8.0/test/deps.ts";
const { Router } = Oak;

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 });