Skip to content

Commit 39b2738

Browse files
committed
Remove unused import
1 parent 9da047e commit 39b2738

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

20_node.md

-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ When the value of `body` is a ((readable stream)), it will have a `pipe` method
474474
To figure out which file path corresponds to a request URL, the `urlPath` function uses the built-in `URL` class (which also exists in the browser) to parse the URL. This constructor expects a full URL, not just the part starting with the slash that we get from `request.url`, so we give it a dummy domain name to fill in. It extracts its pathname, which will be something like `"/file.txt"`, decodes that to get rid of the `%20`-style escape codes, and resolves it relative to the program's working directory.
475475

476476
```{includeCode: ">code/file_server.mjs"}
477-
import {parse} from "node:url";
478477
import {resolve, sep} from "node:path";
479478
480479
const baseDirectory = process.cwd();

0 commit comments

Comments
 (0)