Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
export function denoServer(handler: (req: Request) => Response | Promise<Response>, thisArg?: any) {
if (thisArg) {
handler = handler.bind(thisArg);
}
return Object.assign(handler, {
fetch: (req) => handler(req),
});
}
May 2, 2024