1
2
3
4
5
6
7
import * as Peko from "https://deno.land/x/peko@2.1.0/mod.ts";
import { denoServer } from "https://esm.town/v/pomdtr/deno_server?v=8";
const router = new Peko.Router();
router.get("/", () => new Response("Yes? Peko is also serving something at /hello"));
router.get("/hello", () => new Response("Hello world!"));
export default denoServer(router.handle, router);
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.