From 3f95251302fa88a4fc84a86883e0f71b1cf4a85c Mon Sep 17 00:00:00 2001 From: David Reed Date: Thu, 29 Sep 2022 18:46:51 -0400 Subject: [PATCH] destructure node:http --- src/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index c73bb19..f262efa 100644 --- a/src/index.js +++ b/src/index.js @@ -1,11 +1,11 @@ -import createServer from "@tomphttp/bare-server-node"; -import http from "http"; +import createBareServer from "@tomphttp/bare-server-node"; +import { createServer } from "node:http"; import serveStatic from "serve-static"; import { publicPath } from "ultraviolet-static"; -const bare = createServer("/bare/"); +const bare = createBareServer("/bare/"); const serve = serveStatic(publicPath, { fallthrough: false }); -const server = http.createServer(); +const server = createServer(); server.on("request", (req, res) => { if (bare.shouldRoute(req)) {