| Crates.io | just-serve |
| lib.rs | just-serve |
| version | 0.1.0 |
| created_at | 2025-06-06 18:40:19.078555+00 |
| updated_at | 2025-06-06 18:40:19.078555+00 |
| description | A simple HTTP server for serving a static directory with CORS support |
| homepage | https://github.com/gsteinLTU/just-serve |
| repository | https://github.com/gsteinLTU/just-serve |
| max_upload_size | |
| id | 1703321 |
| size | 38,998 |
When you want to say "just serve this directory" to test something and not worry about CORS.
just-serve is specifically designed to solve CORS issues that arise during local development when you need to serve files to web pages running on different origins.
I was getting tired of existing tools running into a brick wall in the browser due to various CORS issues (and often not having maintainers, which is unfortunate when browser standards evolve).
If you need more control, you should probably write your own server.
cargo install just-serve
just-serve -p [PORT] [DIRECTORY]
For example:
just-serve -p 8080 ./build
Or if the default port is fine and you want to serve the current directory:
just-serve
-p, --port: Specify the port to serve on (default: 8080).-h, --help: Show help message and exit.-V, --version: Show version information and exit.That's all. This is for when you just need to serve a directory right now, to be used by yourself, and you need CORS out of your way.