1import { API_URL } from "https://esm.town/v/std/API_URL";
2async function proxiedFetch(req: Request): Promise<Response> {
3 let query = new URLSearchParams({
4 url: req.url,
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI";
3
4export async function aqi(interval: Interval) {
5 const location = "brooklyn navy yard"; // <-- change to place, city, or zip code
6 const data = await easyAQI({ location });
12const client = Instructor({
13 client: oai,
14 mode: "FUNCTIONS",
15});
16
1import { blob } from "https://esm.town/v/std/blob?v=11";
2
3export default async function(req: Request): Promise<Response> {
4 const count = (await blob.getJSON("blobCounter") ?? 0) + 1;
5 await blob.setJSON("blobCounter", count);
8- only script vals supported
9
10everything else should be fully functional.
11
12you can prefill the editor with
1export function sayHi(name: string): string {
2 return "hi " + name;
3}
1Export function to publish NTFY notification
2
3reference: https://docs.ntfy.sh/publish/#publish-as-json
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI";
3
4export async function aqi(interval: Interval) {
5 const location = "brooklyn navy yard"; // <-- change to place, city, or zip code
6 const data = await easyAQI({ location });
1import { email } from "https://esm.town/v/std/email?v=11";
2
3export default async function(e: Email) {
4 email({
5 subject: "Future of Coding Message: " + e.subject,
4`;
5
6export default function(req: Request) {
7 return new Response(html, {
8 headers: {
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",