xkonti avatar
gptApiTemplate
@xkonti
HTTP
This Val is a template for creating GPT actions. To have a full explanation on how to use it or create your own, you can check out the Creating GPT Actions with ValTown tutorial: Video on YouTube Article on xkonti.tech The GPT using it: Game Idea Exchange GPT
stevekrouse avatar
auth_middleware
@stevekrouse
Script
Authentication middleware Guards your public http vals behind a login page. This val use a json web token stored as an http-only cookie to persist authentication. Usage Set an AUTH_SECRET_KEY env variable (used to sign/verify jwt tokens). Use an API token to authenticate. import { auth } from "https://esm.town/v/pomdtr/auth_middleware"; async function handler(req: Request): Promise<Response> { return new Response("You are authenticated!"); } export default auth(handler); See @pomdtr/test_auth for an example āš ļø Make sure to only provides your api token to vals you trust (i.e. your own), as it gives access to your whole account.
nbbaier avatar
blobEditor
@nbbaier
Script
Usage: import blobEditor from "https://esm.town/v/pomdtr/blob_editor" export default blobEditor("article.md") You can easily protect your val behind @pomdtr/passwordAuth or @pomdtr/emailAuth
vladimyr avatar
lowdb_example
@vladimyr
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.
pomdtr avatar
mdx
@pomdtr
HTTP
export const title = "mdx" {title} Usage import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo"; import { mdx } from "https://esm.town/v/pomdtr/mdx"; const { author, name } = extractValInfo(import.meta.url); export default mdx(author, name);
pomdtr avatar
raw
@pomdtr
HTTP
Fetch the source of a val This val was created before the introduction of https://esm.town Usage curl https://pomdtr-raw.web.val.run/v/<author>/<name>.<extension>[?v=<version>] To see the code of this val, use https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts Examples Fetching the val code $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.tsx You can also use js , jsx and ts extension (only the content-type change, there is no transpilation). Fetching private val Pass an api token as an username $ curl "https://<token>@pomdtr-raw.web.val.run/v/pomdtr/privateVal.ts" Fetching the val README $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.md Getting an image $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.png Fetching a specific version of a val $ curl https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts?v=66 You need to be authenticated to use this method. Fetching the val metadata $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.json Running vals locally using Deno Create a new val.ts file referencing the @pomdtr.add import { add } from "https://pomdtr-raw.web.val.run/v/pomdtr/add.ts"; console.log(add(1, 2)); then use deno run $ deno run ./val.ts 3 If you val accept a request and return a response, you can pass it to Deno.Serve to run it locally! import {raw} from "https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts"; Deno.serve(raw); If your val is private, you can set the DENO_AUTH_TOKENS env. DENO_AUTH_TOKENS=<val-town-token>@pomdtr-raw.web.val.run deno run val.ts
postpostscript avatar
readmeManager
@postpostscript
HTTP
@postpostscript/readmeManager: Edit Val Readmes With Persistent Drafts edit this readme Todo: [ ] Upload images [ ] Autosave/save without reloading page [ ] Ctrl+S [ ] Multiple draft versions [ ] Switch to dark codemirror theme which has markdown styling [ ] Allow for checking checkboxes in preview [ ] View with just the preview [ ] Ability to favorite vals on the Home page
nbbaier avatar
sqliteStudioApp
@nbbaier
HTTP
See SQLite Explorer for information!
vladimyr avatar
jsr2gh
@vladimyr
HTTP
jsr2gh Redirect to jsr package's GitHub repository page, like vladimyr-jsr2gh.web.val.run/@luca/flag Usage https://vladimyr-jsr2gh.web.val.run/<scope>/<name> Example https://vladimyr-jsr2gh.web.val.run/@luca/flag https://vladimyr-jsr2gh.web.val.run/@std/assert
pomdtr avatar
article
@pomdtr
HTTP
Use readme as website Usage import {article} from "https://esm.town/v/pomdtr/article" export default article() See this val http endpoint as an example: https://pomdtr-article.web.val.run
pomdtr avatar
mdx_import
@pomdtr
HTTP
Importing a readme from another readme šŸ¤Æ import Readme from "https://pomdtr-mdx_readme.web.val.run/mod.js"
pomdtr avatar
test_migrations
@pomdtr
Script
// await undo(MIGRATIONS);
tmcw avatar
wasmBlobHost
@tmcw
HTTP
@jsxImportSource https://esm.sh/react
pomdtr avatar
tree_tags
@pomdtr
Script
An interactive, runnable TypeScript val by pomdtr
pomdtr avatar
copy_val_slug
@pomdtr
Script
This val is supposed to be used with the val.town extension. See the extension readme for installation instructions.
pomdtr avatar
list_blobs_command
@pomdtr
Script
An interactive, runnable TypeScript val by pomdtr
v29
May 30, 2024