Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/oak_nest/test_deps.ts>OriginRouter#routes

Refer to nestjs to realize some common functions for Deno
Go to Latest
method OriginRouter.prototype.routes
import { OriginRouter } from "https://deno.land/x/oak_nest@v1.13.15/test_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 });