feat(server): plugins can add middlewares and routes (#1455)
Co-authored-by: RoeHH <git@roeh.ch> Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
co-authored by
RoeHH
Marvin Hagemeister
parent
7dee138bee
commit
50db296fb7
@@ -0,0 +1,17 @@
|
||||
import { Handlers, PageProps } from "../../../server.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
async GET(_req, ctx) {
|
||||
const resp = await ctx.render();
|
||||
return resp;
|
||||
},
|
||||
};
|
||||
|
||||
export default function Home(props: PageProps) {
|
||||
const value = props.state.test as string;
|
||||
return (
|
||||
<div>
|
||||
<h1>{value}</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user