Generate a sunbeam form from a val
sunbeam fetch 'https://pomdtr-valform.express.val.run/pomdtr.add' | sunbeam
Augmented run api
This val is a wrapper on top of the val.town run api, improving it with additional features:
- basic auth
- content-type header in response based on url file extension
Usage
Custom Content-Type
The content-type will be inferred from the filename using the mime-types library.
If you use a .html
extension, the response will be interpreted as text/html
~ $ curl -v 'https://pomdtr-run.web.val.run/pomdtr/helloWorld.html' HTTP/1.1 200 OK ... Content-Type: text/html; charset=utf-8 ... Hello, World!
If you switch the extension to .txt
, the content-type header switch to text/raw
.
~ $ curl -v 'https://pomdtr-run.web.val.run/pomdtr/helloWorld.txt' HTTP/1.1 200 OK ... Content-Type: text/plain; charset=utf-8 ... Hello, World!
Passing arguments
The request is proxyed to the run api, so you can pass args to your vals via query params or body. See the run api docs for more details.
~ $ curl -X POST -d '{"args": ["pomdtr"]}' 'https://pomdtr-run.web.val.run/pomdtr/helloWorld.html' ... < content-type: text/html; charset=utf-8 ... Hello, pomdtr!
Basic Authentication
Just add your val town token as the username:
curl 'https://<val-token>@pomdtr-run.web.val.run/pomdtr/privateVal.txt'
Usage

Van Plate
Example of building html using the mini-van lib.
Access it at https://pomdtr-vanPlateExample.web.val.run
Fetch the source of a val
Usage
curl https://pomdtr-raw.web.val.run/<author>/<name>[@<version>].<extension>
To see the code of this val, use https://pomdtr-raw.web.val.run/pomdtr/raw.ts
Examples
Fetching the val code
$ curl https://pomdtr-raw.web.val.run/pomdtr/add.ts
Fetching private val
Pass an api token as an username
$ curl "https://<token>@pomdtr-raw.web.val.run/pomdtr/privateVal.ts"
Fetching the val README
$ curl https://pomdtr-raw.web.val.run/pomdtr/add.md
Fetching a specific version of a val
$ curl https://$VALTOWN_TOKEN@pomdtr-raw.web.val.run/pomdtr/raw@66.ts
You need to be authenticated to use this method.
Fetching the val metadata
$ curl https://pomdtr-raw.web.val.run/pomdtr/add.json
Running vals locally using Deno
Create a new val.ts
file referencing the @pomdtr.add val
import { add } from "https://pomdtr-raw.web.val.run/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/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
Send yourself a Telegram message
Inspired by console.email
, this val lets you send yourself a Telegram message via the valtown_bot from any of your vals
@me.telegram("hi to me on telegram!")
Installation
1. Start a conversation with valtown_bot
Click here: https://t.me/valtown_bot
2. Copy your Secret
3. Save in your secrets under telegramSecret
4. Fork this val & run it
Save your own private version of a telegram
function to your account by forking this val: https://www.val.town/v/pomdtr.telegram
5. Send a test message!
await @me.telegram("hi to me on telegram!")
PS: the bot code is available here
Usage
Favicon
<link rel="icon" href="https://pomdtr-svgEmoji.express.val.run/💩" />
Markdown

Markdoc Playground
This readme is rendered using markdoc.
{% val author="pomdtr" name="markdocReactExample" %}