5 releases

new 0.2.1 Feb 21, 2024
0.2.0 Jan 25, 2024
0.1.2 Jul 28, 2023
0.1.1 Jul 27, 2023
0.1.0 Jul 27, 2023

#183 in Filesystem

Download history 6/week @ 2023-11-10 3/week @ 2023-11-17 15/week @ 2023-11-24 11/week @ 2023-12-01 3/week @ 2023-12-08 3/week @ 2023-12-15 6/week @ 2023-12-22 5/week @ 2023-12-29 2/week @ 2024-01-05 17/week @ 2024-01-19 19/week @ 2024-01-26 6/week @ 2024-02-02 13/week @ 2024-02-09 178/week @ 2024-02-16

233 downloads per month

GPL-3.0-or-later

33KB
381 lines

dev-serve

GitHub Actions Status Crates

Spin up a simple static site server with live reload

  • Simple: dev-serve <dir> to start a server in <dir>.
  • Live reload: Automatically reloads the page when files change.
  • Customizable: Change the port, enable/disable live reload, and more.
Table of Contents

What and why

Mostly a tool for personal needs where I want to quickly spin up a web server and reload the page when I make changes.

Usage

$ dev-serve -h

Serve a directory with auto-reload

Usage: dev-serve [OPTIONS] [PATH]

Arguments:
  [PATH]  Directory to serve

Options:
  -p, --port <PORT>                Select port to use [default: 3000]
  -r, --reload                     Auto-reload and watch directory
  -e, --extensions <EXTENSIONS>    File extensions to watch
  -v, --verbose                    Verbose output
  -c, --completions <COMPLETIONS>  [possible values: bash, elvish, fish, powershell, zsh]
  -h, --help                       Print help (see more with '--help')
  -V, --version                    Print version

Help

Finally, help is always available with dev-serve --help/dev-serve -h.

Installation

Currently, the package is available a couple of places, including Homebrew, AUR and Nix.

Cargo
cargo install dev-serve
Homebrew
  1. brew tap sondr3/homebrew-taps
  2. brew install dev-serve

Release pages

You can also download the matching release from the release tab, extracting the archive and placing the binary in your $PATH. Note that for Linux the unknown-linux-musl.tar.gz is preferred as it is statically linked and thus should run on any Linux distribution.

LICENSE

GPLv3+.

Dependencies

~14–27MB
~371K SLoC