Routes
This page summarizes how to declare routes.
Last updated
This page summarizes how to declare routes.
Last updated
import { GET, POST, PUT, HEAD, DELETE, OPTIONS, PATCH, CONTROLLER, MandarineCore } from "https://deno.land/x/mandarinets/mod.ts";
@Controller()
export class MyController {
@GET('/hello-world')
public httpHandler() {
return "You have requested me. Hello World";
}
}
new MandarineCore().MVC().run();# http://localhost:8080/hello-world
You have requested me. Hello Worldimport { GET, POST, PUT, HEAD, DELETE, OPTIONS, PATCH, CONTROLLER, MandarineCore } from "https://deno.land/x/mandarinets/mod.ts";
@Controller()
export class MyController {
...
@POST('/hello-world')
...
}
new MandarineCore().MVC().run();