ddduckkk / main.ts
dragggl25's picture
Update main.ts
04e0292 verified
raw
history blame contribute delete
301 Bytes
// main.ts
import { serve } from "https://deno.land/[email protected]/http/server.ts";
import { router } from "./router.ts";
import { CONFIG } from "./utils.ts";
console.log(`🚀 服务器启动在端口 ${CONFIG.PORT}`);
serve((req: Request) => router(req), { port: CONFIG.PORT, hostname: "0.0.0.0" });