Fetch the source of a val
This val was created before the introduction of https://esm.town
curl https:
To see the code of this val, use https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts
$ curl https:
You can also use js
, jsx
and ts
extension (only the content-type change, there is no transpilation).
Pass an api token as an username
$ curl "https://<token>@pomdtr-raw.web.val.run/v/pomdtr/privateVal.ts"
$ curl https:
$ curl https:
Fetching a specific version of a val
$ curl https:
You need to be authenticated to use this method.
$ curl https:
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
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
What a great val!