Skip to content

noClaps/serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serve

A simple HTTP server for serving a directory.

Usage

Usage: serve <directory> [--port <port>]

Arguments:
  <directory>          The directory to serve.

Options:
  -p, --port <port>    The port to serve at. (default: 3000)
  -h, --help           Show this help and exit.

You can use the tool simply by running:

serve dist    # or whatever path to the directory you want to serve

This will serve the dist/ directory at http://localhost:3000.

You can also customise the port it serves at using the --port or -p option:

serve static --port 4321
serve static -p 4321

This will serve the static/ directory at http://localhost:4321.

You can view the help by using --help or -h:

serve -h
serve --help

Installation

You can build it from source using Rust:

cargo install --git https://github.com/noClaps/serve

About

A simple HTTP server for serving a directory

Resources

License

Stars

Watchers

Forks

Contributors

Languages