Skip to main content
Module

x/masx200_deno_serve_https/hostnameForDisplay.ts

deno-serve-https 对于deno的低级api的封装,可以启动同时支持http/1.1和http/2的https服务,并且在一个端口上同时支持了http连接升级,websocket,connect方法.
Latest
File
export function hostnameForDisplay(hostname: string) { // If the hostname is "0.0.0.0", we display "localhost" in console // because browsers in Windows don't resolve "0.0.0.0". // See the discussion in https://github.com/denoland/deno_std/issues/1165 return hostname === "0.0.0.0" ? "localhost" : hostname;}