This val was created before the introduction of https://esm.town
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
$ 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).
Pass an api token as an username
$ curl "https://<token>@pomdtr-raw.web.val.run/v/pomdtr/privateVal.ts"
$ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.md
$ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.png
$ curl https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts?v=66
You need to be authenticated to use this method.
$ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.json
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