function createServer() {
	const server = http.createServer((req, res) => {
		let file;
		const pathname = "." + /** @type {string} */ (req.url).replace(/\?.*$/, "");
		if (/** @type {string} */ (req.url).endsWith("?no-cache")) {
			res.setHeader("Cache-Control", "no-cache, max-age=60");
		} else {
			res.setHeader("Cache-Control", "public, immutable, max-age=600");
		}
		try {
			file = fs
				.readFileSync(path.resolve(__dirname, pathname))
				.toString()
				.replace(/\r\n?/g, "\n")
				.trim();
		} catch (e) {
			if (fs.existsSync(path.resolve(__dirname, pathname + ".js"))) {
				res.statusCode = 301;
				res.setHeader("Location", pathname.slice(1) + ".js");
				res.end();
				return;
			}
			res.statusCode = 404;
			res.end();
			return;
		}
		res.setHeader(
			"Content-Type",
			pathname.endsWith(".js") ? "text/javascript" : "text/css"
		);
		res.end(file);
	});
	server.unref();
	return server;
}
@returns {import("http").Server} server instance