Val Town CDN

If you only want to get the source of a val, you should use https://esm.town/ instead.

Usage

curl https://pomdtr-cdn.web.val.run/<author>/<name>.<extension>[?v=<version>]

To see the code of this val, use https://pomdtr-cdn.web.val.run/pomdtr/cdn.ts

Examples

Fetching the val code

$  curl https://pomdtr-cdn.web.val.run/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-cdn.web.val.run/pomdtr/privateVal.ts"

Fetching the val README

$ curl https://pomdtr-cdn.web.val.run/pomdtr/add.md

Getting an image

$ curl https://pomdtr-cdn.web.val.run/pomdtr/add.png

Fetching a specific version of a val

$ curl https://pomdtr-cdn.web.val.run/pomdtr/cdn.ts?v=66

You need to be authenticated to use this method.

Fetching the val metadata

$ curl https://pomdtr-cdn.web.val.run/pomdtr/add.json