examples/deno/index.ts

10 lines
312 B
TypeScript

export function add(a: number, b: number): number {
return a + b;
}
// Learn more at https://docs.deno.com/runtime/manual/examples/module_metadata#concepts
if (import.meta.main) {
console.log("Add 2 + 3 =", add(2, 3));
}
Deno.serve({ hostname: "0.0.0.0", port: 8000 }, () => new Response("Hello, world!"));