kurit-devserver

Crates.iokurit-devserver
lib.rskurit-devserver
version0.1.0
sourcesrc
created_at2023-10-10 00:23:32.026094
updated_at2023-10-10 00:23:32.026094
descriptionA zero configuration library for hosting a local folder via http. Refer to 'devserver' for the command line tool.
homepage
repositoryhttps://github.com/kettle11/devserver/tree/master/devserver_lib
max_upload_size
id998621
size42,204
(AkiaCode)

documentation

README

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/

Commit count: 68

cargo fmt