diff --git a/Makefile b/Makefile index 56fdc5a..5bf9fbe 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ .PHONY: cli cli: deno run cli.ts +.PHONY: run +run: + deno run --allow-net server.ts tests: deno test --coverage --unstable \ No newline at end of file diff --git a/server.ts b/server.ts new file mode 100644 index 0000000..9083954 --- /dev/null +++ b/server.ts @@ -0,0 +1,6 @@ +import { listenAndServe } from "https://deno.land/std@0.87.0/http/server.ts"; + +const port = 8000; + +console.log(`Server listening on http://localhost:${port}/`); +await listenAndServe({ port }, (req) => req.respond({ body: "Hello" }));