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

x/deno_nest/modules/hono/example/app.controller.ts>AppController

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
import { AppController } from "https://deno.land/x/deno_nest@v3.4.0/modules/hono/example/app.controller.ts";

Constructors

new
AppController(appService: AppService)

Methods

beforeApplicationShutdown(signal?: string | undefined): void | Promise<void>
helloName(name: string)
onModuleDestroy(): void | Promise<void>
onModuleInit(): void | Promise<void>
query(name: string)
save(body: SaveDto)

This example will auto validate the body, because the SaveDto used the class_validator decorators.

If you set SaveDto to any or a interface, it will not work.

This example will work, because the QueryDto has the@Property() decorator.

This example will not work, because the QueryWithoutPropDto does not have the@Property() decorator.