Originally posted by **Aobanana-chan** June 10, 2024
For some reasons, I am migrating my website from Node.js/Fastify to Actix Web, but I am having some difficulties setting up static directories. I tried to mount two directories, "./public" and "./dist" to "/", but it failed.
Here is a simplified example code:
```
App::new()
.service(Files::new("/", "./dist"))
.service(Files::new("/", "./public"))
```
In the first service, if the file is not found, it directly responds with a 404 instead of moving to the next service. I realize this approach doesn't work.
Possible API
Cavets
As noted in the discussion answers, this does make it hard to support options like
show_index
.Discussed in https://github.com/actix/actix-web/discussions/3398