Srv Dev Server - Http dev server written in Rust
Go to file
dependabot[bot] 3953820138
Bump crossbeam-utils from 0.8.6 to 0.8.8
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.6 to 0.8.8.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.6...crossbeam-utils-0.8.8)

---
updated-dependencies:
- dependency-name: crossbeam-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 21:10:58 +00:00
.cargo add update deps 2022-06-06 13:01:22 +08:00
.github/workflows bug fixs 2022-06-06 18:23:20 +08:00
src bug fixs 2022-06-06 14:27:56 +08:00
templates add LICENSE 2021-08-25 00:05:33 +08:00
.gitignore 0.1.0-alpha.0 2021-08-01 19:57:26 +08:00
Cargo.lock Bump crossbeam-utils from 0.8.6 to 0.8.8 2022-06-06 21:10:58 +00:00
Cargo.toml add update deps 2022-06-06 13:01:22 +08:00
LICENSE add LICENSE 2021-08-25 00:05:33 +08:00
README.md v1.0.0-rc.6 Optimize the code and supplement the readme 2021-09-05 11:52:26 +08:00
screenshot.png 1.0.0-rc.4 add readme and 403 connection close bug fix 2021-08-25 20:41:59 +08:00

README.md

Srv Dev Server

This is a simple HTTP Server for use in a development environment, inspired by simple-http-server and caddy2, and it is also a practice project for me to learn rust.

Screenshot

screenshot

Built With

Features

  • Automatic generation of directory listings (default enabled)
  • Relative path/absolute path/support
  • Brotli/Gzip/Deflate streaming compression support (default disabled, disables Content-length and segmented downloads when enabled)
  • Control whether dotfiles are displayed and can be accessed (default disabled)
  • HTTP cache support, 304 support, Last-Modified/ETag support, of course you can also turn off cache
  • Clearly colored organized log
  • Disable access logging or disable all logging support
  • Automatically open default browser (default disabled)
  • Single-Page Application mode (always serve /index.html when the file is not found)
  • Custom listening address (default 0.0.0.0) Custom listening port number (default 8000)
  • HTTP Basic Authentication Support
  • TLS/SSL support, HTTP/2 support
  • One click to enable CORS, custom CORS header support
  • cargo doc support

Install

Pre-compiled Version

Linux

Archlinux
yay -S srv-bin
Other Linux

Download the pre-compiled srv-x86_64-unknown-linux-musl.tar.gz on the releases, and copy the srv file in the compressed package to /usr/bin as a ROOT user with 755 permissions.

wget https://github.com/Tim-Paik/srv/releases/download/v1.0.0-rc.6/srv-x86_64-unknown-linux-musl.tar.gz
tar -xzvf srv-x86_64-unknown-linux-musl.tar.gz
install -Dm0755 -t /usr/bin/ srv
rm srv srv-x86_64-unknown-linux-musl.tar.gz

for reference only

MacOS

I'm sorry I don't have the corresponding equipment, but I can only provide srv-x86_64-apple-darwin.tar.gz (Of course, if someone can sponsor me a Mac I would be very grateful)

Windows

Download the pre-compiled srv-x86_64-pc-windows-msvc.zip in the releases, unzip the srv.exe and copy it to your %PATH% (if you dont know what this is, move srv.exe to %SystemRoot%\System32)

Compile and Install

You Need:

  • Rust & Cargo Installation
  • Git Installation
  • Gcc/Msvc Toolchain Installation
git clone git@github.com:Tim-Paik/srv.git
cd srv
cargo build --release
strip target/release/srv

Then you can find the compiled executable file named srv in the target/release/ folder.

Usage

Execute srv --help to get all the usage methods

Waiting to be added...

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.