1
0
mirror of https://github.com/actix/examples synced 2024-12-18 08:23:10 +01:00
examples/basics/static-files/README.md

19 lines
508 B
Markdown
Raw Normal View History

2022-02-18 04:36:04 +01:00
# Static Files
Demonstrates how to serve static files. Inside the `./static` folder you will find 2 subfolders:
2022-03-06 01:43:10 +01:00
- `root`: A tree of files that will be served at the web root `/`. This includes the `css` and `js` folders, each containing an example file.
- `images`: A list of images that will be served at `/images` path, with file listing enabled.
## Usage
2022-02-18 04:36:04 +01:00
```sh
cd basics/static-files
cargo run
```
### Available Routes
- [GET /](http://localhost:8080/)
- [GET /images](http://localhost:8080/images)