From 76005a3603368a71edc382d6d557b9af7ae79ee1 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 23 Feb 2025 19:50:03 -0600 Subject: [PATCH] feat: Add Deno build task and simple HTTP server --- deno/deno.json | 3 ++- deno/main.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/deno/deno.json b/deno/deno.json index 5b320c2..8c2a561 100644 --- a/deno/deno.json +++ b/deno/deno.json @@ -1,6 +1,7 @@ { "tasks": { - "dev": "deno run --watch main.ts" + "dev": "deno run --watch main.ts", + "build": "deno run build.ts" }, "imports": { "@std/assert": "jsr:@std/assert@1" diff --git a/deno/main.ts b/deno/main.ts index 292ce5f..10cf97a 100644 --- a/deno/main.ts +++ b/deno/main.ts @@ -6,3 +6,5 @@ export function add(a: number, b: number): number { if (import.meta.main) { console.log("Add 2 + 3 =", add(2, 3)); } + +Deno.serve(() => new Response("Hello, world!"));