FediShoop/fedishoop/main.ts

14 lines
378 B
TypeScript

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 })),
);