feat: layered and scoped middleware and context state (#139)
Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
co-authored by
Luca Casonato
parent
b36f2c1a43
commit
8d4e77f4ac
@@ -0,0 +1,11 @@
|
||||
import { Handlers } from "../../../server.ts";
|
||||
|
||||
interface State {
|
||||
root: string;
|
||||
}
|
||||
|
||||
export const handler: Handlers<undefined, State> = {
|
||||
GET(_req: Request, { state }) {
|
||||
return new Response(JSON.stringify(state));
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user