Avatar

stevekrouse

mayor of val town
Likes
452
saolsen avatar
connect4_site
@saolsen
HTTP (deprecated)
Play connect4. Write agents that play connect4. Battle your agents against other agents. It's fun.
jamiedubs avatar
valtownGeocities
@jamiedubs
HTTP (deprecated)
Forked from jamiedubs/databin
nilslice avatar
md2html
@nilslice
HTTP (deprecated)
An interactive, runnable TypeScript val by nilslice
stevekrouse avatar
blob_admin
@stevekrouse
HTTP (deprecated)
Forked from stevekrouse/sqlite_admin
rlesser avatar
dependency_graph
@rlesser
HTTP (deprecated)
An interactive, runnable TypeScript val by rlesser
pomdtr avatar
testBasicAuth
@pomdtr
HTTP (deprecated)
An interactive, runnable TypeScript val by pomdtr
pomdtr avatar
basicAuth
@pomdtr
Script
Val Town Basic Auth Add basic auth on top of any http val Usage Wrap your HTTP handler in the basicAuth middleware. import { basicAuth } from "https://esm.town/v/pomdtr/basicAuth"; function handler(req: Request) { return new Response("You are authenticated!"); } export default basicAuth(handler, { verifyUser: (username, password) => username == "user" && password == "password" }); If you want to use an apiToken as a password: import { basicAuth } from "https://esm.town/v/pomdtr/basicAuth"; import { verifyToken } from "https://www.val.town/v/pomdtr/verifyToken" function handler(req: Request) { return new Response("You are authenticated!"); } export default basicAuth(handler, { verifyUser: (_, password) => verifyToken(password) });
stevekrouse avatar
honoZodSwaggerUi
@stevekrouse
HTTP (deprecated)
Forked from nbbaier/honoZodSwaggerUi
nbbaier avatar
honoZodSwaggerUi
@nbbaier
HTTP (deprecated)
// The OpenAPI documentation will be available at /doc
nbbaier avatar
dbToAPI
@nbbaier
Script
Create an API from a lowdb blob This val exports a function that takes a lowdb instance and returns a Hono router that can be used to interact with the data. This is the beginning of an implementation of something like json-server for Val Town. The resulting server also comes with a frontend at / . The code for the frontend can be found here . See this val for an example. Things I'd like to implement All HTTP methods Custom route definitions (like in json-server ) Custom frontends Filtering, sorting, pagination, etc
karfau avatar
aocXX_00
@karfau
Script
Forked from karfau/aoc15_03
pomdtr avatar
lowdb_example
@pomdtr
Script
Lowdb Example This val demonstrates the integration between valtown and lowdb . Read the Lodash section if you want to give superpowers to your DB.
dupontgu avatar
washer_3d
@dupontgu
HTTP (deprecated)
Generates a 3D model of a flat washer, in .stl format. Pass in number parameters for washer "thickness" ("t"), "hole_radius" ("hr"), and "outer_radius" ("r"): https://dupontgu-washer_3d.web.val.run/?t=2&hr=8&r=10
stevekrouse avatar
sqlite_admin
@stevekrouse
HTTP (deprecated)
Forked from stevekrouse/reactExample
pomdtr avatar
gfm
@pomdtr
Script
Markdown to html (with github styling)
stevekrouse avatar
weatherGPT
@stevekrouse
Cron