summaryrefslogtreecommitdiff
path: root/fedishoop/main.ts
diff options
context:
space:
mode:
authorCSDUMMI <csdummi.misquality@simplelogin.co>2024-10-07 14:25:10 +0200
committerCSDUMMI <csdummi.misquality@simplelogin.co>2024-10-07 14:26:21 +0200
commit506ef8a43c3985067f2b9004fcc601056e172ddd (patch)
tree722fe4b80cfae576be62edba6a3f4b7c01d0be5b /fedishoop/main.ts
parentebfdee4de375e47e96eb776b4a4e754de8a25ae1 (diff)
Create initial dev environ
Diffstat (limited to 'fedishoop/main.ts')
-rw-r--r--fedishoop/main.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/fedishoop/main.ts b/fedishoop/main.ts
new file mode 100644
index 0000000..c54396d
--- /dev/null
+++ b/fedishoop/main.ts
@@ -0,0 +1,13 @@
+import "@std/dotenv/load";
+import { behindProxy } from "@hongminhee/x-forwarded-fetch";
+import federation from "./federation.ts";
+import "./logging.ts";
+
+Deno.serve(
+ {
+ port: 8000,
+ onListen: ({ port, hostname }) =>
+ console.log("Server started at http://" + hostname + ":" + port)
+ },
+ behindProxy((req) => federation.fetch(req, { contextData: undefined })),
+);