Update main.ts
Browse files
main.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
import { serve } from "./deps.ts";
|
| 2 |
|
| 3 |
-
const PORT = 8000;
|
| 4 |
-
const s = serve(`0.0.0.0:${PORT}`);
|
| 5 |
-
const body = new TextEncoder().encode("Hello World\n");
|
| 6 |
|
| 7 |
console.log(`Server started on port ${PORT}`);
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
| 1 |
import { serve } from "./deps.ts";
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
console.log(`Server started on port ${PORT}`);
|
| 5 |
+
Deno.serve(
|
| 6 |
+
{ port: 8000, hostname: "0.0.0.0" },
|
| 7 |
+
(_req) => new Response("Hello, world from Deno")
|
| 8 |
+
);
|