#web-server #web #server

devserver_lib

A zero configuration library for hosting a local folder via https. Refer to 'devserver' for the command line tool.

4 releases

0.4.2 Mar 25, 2023
0.4.1 Jan 2, 2022
0.4.0 May 7, 2021
0.1.7 Sep 14, 2020
0.1.0 Dec 30, 2019

#1461 in HTTP server

Download history 6380/week @ 2025-10-16 5654/week @ 2025-10-23 6567/week @ 2025-10-30 7277/week @ 2025-11-06 4666/week @ 2025-11-13 6752/week @ 2025-11-20 7340/week @ 2025-11-27 6599/week @ 2025-12-04 8222/week @ 2025-12-11 3096/week @ 2025-12-18 1029/week @ 2025-12-25 3804/week @ 2026-01-01 8062/week @ 2026-01-08 10468/week @ 2026-01-15 11910/week @ 2026-01-22 11637/week @ 2026-01-29

43,573 downloads per month
Used in 2 crates

Zlib license

43KB
792 lines

devserver_lib

devserver_lib does (nearly) the minimum necessary to serve a static folder over https://localhost:8080.

DO NOT USE DEVSERVER_LIB IN PRODUCTION

devserver_lib should only be used for locally hosting files on a trusted network.

devserver_lib does not properly handle the attacks robust servers must withstand on an open network.

usage

extern crate devserver_lib;

fn main() 
{
  devserver_lib::run(&"localhost", 8080, "", /*Auto-reload:*/ true ); // Runs forever serving the current folder on http://localhost:8080
}

dependencies

rust-native-tls

Dependencies only for the reload feature: notify sha-1 base64

Resources to learn from

https://doc.rust-lang.org/book/ch20-00-final-project-a-web-server.html

http://concisecoder.io/2019/05/11/creating-a-static-http-server-with-rust-part-1/

Dependencies

~0–5.5MB
~124K SLoC