summaryrefslogtreecommitdiff
path: root/docs/examples/file_server.md
blob: 9fbe27bd37cbaccf26ce4113838ea6a3cc6967bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
## File server

This one serves a local directory in HTTP.

```shell
deno install --allow-net --allow-read https://deno.land/std/http/file_server.ts
```

Run it:

```shell
$ file_server .
Downloading https://deno.land/std/http/file_server.ts...
[...]
HTTP server listening on http://0.0.0.0:4500/
```

And if you ever want to upgrade to the latest published version:

```shell
$ file_server --reload
```