bumpup 1.16.2 and std/http 0.114.0 (#220)

This commit is contained in:
tsutorm
2021-11-21 18:43:54 +09:00
committed by GitHub
parent 38e1d00673
commit 194ea6d354
2 changed files with 5 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
FROM denoland/deno:1.14.0
FROM denoland/deno:1.16.2
WORKDIR /app

View File

@@ -1,6 +1,7 @@
import { listenAndServe } from "https://deno.land/std@0.107.0/http/server.ts"
import { serve } from "https://deno.land/std@0.114.0/http/server.ts"
const port = parseInt(Deno.env.get("PORT") ?? "8000")
listenAndServe(`:${port}`, () => new Response("Choo Choo! Welcome to your Deno app\n"))
const port = parseInt(Deno.env.get("PORT") ?? "8000");
serve(() => new Response("Choo Choo! Welcome to your Deno app\n"),
{ addr: `:${port}` });
console.log(`http://localhost:${port}/`);