1// This val will respond to all HTTP requests with "Hello world"
2
3export default async function(req: Request): Promise<Response> {
4 return new Response("Hello world", {
5 headers: { "Content-Type": "text/plain" },
1// This val simply responds to all HTTP requests with "Hello world"
2export default async function main(req: Request): Promise<Response> {
3 return new Response("Hello world");
4}
1// This val will respond with "Hello, World!" to all incoming HTTP requests.
2
3export default async function main(req: Request): Promise<Response> {
4 return new Response("Hello, World!", { headers: { "Content-Type": "text/plain" } });
5}
1// This val will respond with "Hello world" to all incoming HTTP requests
2
3export default async function main(req: Request): Promise<Response> {
4 return new Response("Hello world");
5}
2// It uses Deno's built-in HTTP server.
3
4export default async function main(req: Request): Promise<Response> {
5 return new Response("Hello, World!", {
6 headers: { "Content-Type": "text/plain" },
1// This val responds with "Hello, World!"
2export default async function main(req: Request): Promise<Response> {
3 return new Response("Hello, World!", {
4 headers: {
1// This val simply responds with "Hello world" on every HTTP request
2
3export default async function main(req: Request): Promise<Response> {
4 return new Response("Hello world");
5}
1// This val responds with "Hello, World!" on every HTTP request
2
3export default async function main(req: Request): Promise<Response> {
4 return new Response("Hello, World!", { headers: { "Content-Type": "text/plain" } });
5}
1// This val will respond with "Hello world" to all incoming HTTP requests
2
3export default async function main(): Promise<Response> {
4 return new Response("Hello world");
5}
1// Define the main function that will be executed on each HTTP request
2export default async function main(req: Request): Promise<Response> {
3 // Return a simple "Hello, World!" response
4 return new Response("Hello, World!", { headers: { "Content-Type": "text/plain" } });
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": "*",