From d8448f71f7ad772691c90984d7b7bfb0e408f02d Mon Sep 17 00:00:00 2001 From: emrah Date: Wed, 7 Aug 2024 21:15:34 +0300 Subject: [PATCH] fix(api): deno.serve and djwt version --- api/jitok.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/api/jitok.ts b/api/jitok.ts index 2c2d905..67604dc 100644 --- a/api/jitok.ts +++ b/api/jitok.ts @@ -1,15 +1,14 @@ // ---------------------------------------------------------------------------- // jitok.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 { Algorithm } from "https://deno.land/x/djwt@v3.0.1/algorithm.ts"; +import { STATUS_CODE } from "https://deno.land/std@0.224.0/http/status.ts"; +import { Algorithm } from "https://deno.land/x/djwt@v3.0.2/algorithm.ts"; import { create, getNumericDate, Header, Payload, -} from "https://deno.land/x/djwt@v3.0.1/mod.ts"; +} from "https://deno.land/x/djwt@v3.0.2/mod.ts"; const HOSTNAME = "0.0.0.0"; const PORT = 9000; @@ -305,10 +304,10 @@ async function handler(req: Request): Promise { // ---------------------------------------------------------------------------- function main() { - serve(handler, { + Deno.serve({ hostname: HOSTNAME, port: PORT, - }); + }, handler); } // ----------------------------------------------------------------------------