2020-05-07 00:21:13 +02:00
|
|
|
## File server
|
|
|
|
|
|
|
|
This one serves a local directory in HTTP.
|
|
|
|
|
2020-05-10 03:09:42 +02:00
|
|
|
```shell
|
2020-07-31 11:12:20 +02:00
|
|
|
deno install --allow-net --allow-read https://deno.land/std@$STD_VERSION/http/file_server.ts
|
2020-05-07 00:21:13 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Run it:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ file_server .
|
2020-07-31 11:12:20 +02:00
|
|
|
Downloading https://deno.land/std@$STD_VERSION/http/file_server.ts...
|
2020-05-07 00:21:13 +02: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-11 09:24:41 +09:00
|
|
|
file_server --reload
|
2020-05-07 00:21:13 +02:00
|
|
|
```
|