stevekrouse-sqlite_admin.web.val.run
  • stevekrouse avatar
    sqlite_admin_tables
    @stevekrouse
    @jsxImportSource https://esm.sh/hono@3.9.2/jsx
    Script
  • stevekrouse avatar
    sqlite_admin_table
    @stevekrouse
    @jsxImportSource https://esm.sh/hono@3.9.2/jsx
    Script
  • std avatar
    sqlite
    @std
    SQLite - Docs ↗ SQLite is a lightweight, standard database. Every Val Town account comes with its own private SQLite database that is accessible from any of your vals via std/sqlite . Val Town SQLite is powered by Turso . Usage Migrations ORMs You may find these admin viewers helpful managing your database: SQLite Explorer (built in Val Town) LibSQL Studio Limits You can store 10mb on the free plan and up to 1gb on the paid plan. Contact us if you need more space. 📝 Edit docs
    Script
  • stevekrouse avatar
    html
    @stevekrouse
    An interactive, runnable TypeScript val by stevekrouse
    Script
  • pomdtr avatar
    verifyToken
    @pomdtr
    An interactive, runnable TypeScript val by pomdtr
    Script
  • pomdtr avatar
    basicAuth
    @pomdtr
    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) });
    Script
1
Next
August 2, 2024