Thanks to visit codestin.com
Credit goes to lib.rs

#server #directory #port #local #wasm #url-scheme

app localserver

Local server serving specified folder

2 releases

0.1.1 Dec 25, 2020
0.1.0 Sep 22, 2020

#16 in #url-scheme

GPL-3.0-only

24KB

localserver

Crates.io

Simple server to serve specified folder locally

Motivation

Sometimes you just need a simple server that would serve a certain directory. For example, when you're compiling your code to Web Assembly, browser won't let you access those files via file URI scheme (file:\\), you'll need to serve them via http.

Implementation

It leverages the power of warp, so all the complexity is handled there.

Usage

localserver /path/to/folder [port] (optional)

Dependencies

~22–30MB
~493K SLoC