0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
denoland-deno/docs/examples/file_server.md

23 lines
428 B
Markdown
Raw Normal View History

2020-05-06 18:21:13 -04:00
## File server
This one serves a local directory in HTTP.
```shell
deno install --allow-net --allow-read https://deno.land/std@$STD_VERSION/http/file_server.ts
2020-05-06 18:21:13 -04:00
```
Run it:
```shell
$ file_server .
Downloading https://deno.land/std@$STD_VERSION/http/file_server.ts...
2020-05-06 18:21:13 -04:00
[...]
HTTP server listening on http://0.0.0.0:4500/
```
And if you ever want to upgrade to the latest published version:
```shell
2020-06-10 20:24:41 -04:00
file_server --reload
2020-05-06 18:21:13 -04:00
```