destructure node:http

This commit is contained in:
David Reed 2022-09-29 18:46:51 -04:00
parent a236a10cc2
commit 3f95251302

View file

@ -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)) {