1// This val will respond to any request with an HTML "Hello, world!" message with some fun CSS styles
2export default async function(req: Request): Promise<Response> {
3 const html = `
4 <html>
1// This val will respond to any request with an HTML "Hello, world!" message styled with some fun CSS
2export default async function(req: Request): Promise<Response> {
3 const html = `
4 <html>
1// This val will respond to any request with an HTML "Hello, world!" message styled with fun CSS
2export default async function(req: Request): Promise<Response> {
3 const html = `
4 <html>
1-2
2// This val will respond to any request with an HTML "Hello, world!" message styled with fun CSS
3export default async function (req: Request): Promise<Response> {
4 const htmlContent = `
5 <style>
1// This val will respond to any request with an HTML "Hello, world!" message styled with fun CSS
2export default async function(req: Request): Promise<Response> {
3 const html = `
4 <html>
1// This val will respond to any request with an HTML "Hello, world!" message
2export default async function(req: Request): Promise<Response> {
3 return new Response("<h1>Hello, world!</h1>", { headers: { "Content-Type": "text/html" } });
4}
1// This val will respond to any request with "Hello, world!"
2export default async function(req: Request): Promise<Response> {
3 return new Response("Hello, world!", { headers: { "Content-Type": "text/plain" } });
4}
29 let direction = 1;
30
31 // Function to move the cat around the screen
32 function moveCat() {
33 if (x >= window.innerWidth - 100) {
34 direction = -1;
9const sparklineData = [5, 10, 5, 20, 15, 30, 25];
10
11export default function handler() {
12 const svg = sparklineSVG({ data: sparklineData });
13
5import { sparklineSVG } from "https://esm.town/v/stevekrouse/sparklineSVG";
6
7export default async function (req: Request): Promise<Response> {
8 const data = [5, 3, 9, 6, 5, 9, 7, 3, 5, 2, 6]; // Sample data for the sparkline
9
A helper function to build a file's email
Simple functional CSS library for Val Town
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": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.