From 6b390191045308fee7e3889816e99a009aa28c33 Mon Sep 17 00:00:00 2001 From: emrah Date: Wed, 7 Aug 2024 18:58:19 +0300 Subject: [PATCH] fix: deno.serve --- sip-dial-plan.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sip-dial-plan.ts b/sip-dial-plan.ts index acf9f7b..b419a70 100644 --- a/sip-dial-plan.ts +++ b/sip-dial-plan.ts @@ -2,8 +2,7 @@ // sip-dial-plan.ts // ---------------------------------------------------------------------------- import { HOSTNAME, PORT, TOKEN_ALGORITHM, TOKEN_SECRET } from "./config.ts"; -import { serve } from "https://deno.land/std@0.211.0/http/server.ts"; -import { STATUS_CODE } from "https://deno.land/std@0.211.0/http/status.ts"; +import { STATUS_CODE } from "https://deno.land/std@0.224.0/http/status.ts"; import { verify } from "https://deno.land/x/djwt@v3.0.2/mod.ts"; import { type Payload } from "https://deno.land/x/djwt@v3.0.2/mod.ts"; @@ -134,10 +133,10 @@ async function handler(req: Request): Promise { // ---------------------------------------------------------------------------- function main() { - serve(handler, { + Deno.serve({ hostname: HOSTNAME, port: PORT, - }); + }, handler); } // ----------------------------------------------------------------------------