Skip to content

gsteinLTU/just-serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

just-serve

Crates.io

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.

About

Just serve this directory right now (and don't make me think about CORS!)

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages