Avatar

pomdtr

I mainly enjoy building dev tools: - VS Code integration: https://github.com/pomdtr/valtown-vscode - CLI: https://github.com/pomdtr/vt
Joined June 14, 2023
Public vals
317
pomdtr avatar
pomdtr
jadeBoar
HTTP
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
verifyToken
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
sapphireSeahorse
HTTP
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
turquoiseArmadillo
HTTP
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
fetchAPI
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
cmdk_command
HTTP
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
wanix
HTTP
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
python
Script
An interactive, runnable TypeScript val by pomdtr
1
pomdtr avatar
pomdtr
staticChess
HTTP
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
pwa
Script
Add a pwa manifest to an http val (to open in as an app in iOS). See https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps for available fields. Usage import handler from "https://esm.town/v/maxm/staticChess"; import { pwa } from "https://esm.town/v/pomdtr/pwa"; export default pwa(handler, { name: "Static Chess", display: "standalone", background_color: "#ffffff", start_url: "/", });
3
pomdtr avatar
pomdtr
apricotPartridge
HTTP
// use my private proxy
0
pomdtr avatar
pomdtr
createTursoProxy
Script
Usage Create proxy val for your turso DB (make it private to protect it behind your val town token) import {createTursoProxy} from "https://esm.town/v/pomdtr/createTursoProxy" export default createTursoProxy("<tursoDatabaseUrl>", "<tursoAuthToken>") Wire any existing val to the proxy val import { setEnv } from "https://esm.town/v/pomdtr/setEnv"; // use my private proxy setEnv("VALTOWN_API_URL", "<proxy-url>"); // wire sqlite explorer to a turso db ! const { handler } = await import("https://esm.town/v/nbbaier/sqliteExplorerApp"); export default handler;
0
pomdtr avatar
pomdtr
lastloginHono
Script
See @pomdtr/lastlogin for more informations about the middleware Example /** @jsxImportSource npm:hono@3/jsx */ import { lastlogin } from "https://esm.town/v/pomdtr/lastloginHono"; import { verifyUserEmail } from "https://esm.town/v/pomdtr/verifyUserEmail" import { Hono } from "npm:hono"; const app = new Hono(); const lastloginMiddleware = lastlogin({ verifyEmail: verifyUserEmail }); // required for the auth pages to work app.use("/auth/*", lastloginMiddleware); // this page is public app.get("/", async (c) => { return c.html( <div> There is a secret message for you if you{" "}<a href="/secret">login</a> </div>, ); }); // this page requires the user to signup app.get("/secret", lastloginMiddleware, async (c) => { const email = c.req.header("X-User-Email"); return c.html( <div> I think {email} is a really silly email address, actually. </div>, ); }); export default app.fetch;
1
pomdtr avatar
pomdtr
handler
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
lastloginExample
HTTP
An interactive, runnable TypeScript val by pomdtr
2
pomdtr avatar
pomdtr
streamDemo
HTTP
An interactive, runnable TypeScript val by pomdtr
0