just-serve

Crates.iojust-serve
lib.rsjust-serve
version0.1.0
created_at2025-06-06 18:40:19.078555+00
updated_at2025-06-06 18:40:19.078555+00
descriptionA simple HTTP server for serving a static directory with CORS support
homepagehttps://github.com/gsteinLTU/just-serve
repositoryhttps://github.com/gsteinLTU/just-serve
max_upload_size
id1703321
size38,998
Gordon Stein (gsteinLTU)

documentation

README

just-serve

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.

Installation

cargo install just-serve

Usage

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

Options

  • -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.

Commit count: 8

cargo fmt