syserve

Crates.iosyserve
lib.rssyserve
version0.3.0
sourcesrc
created_at2021-03-08 13:34:11.141486
updated_at2021-04-21 17:54:38.853482
descriptionSimple server for yew and yew-router apps
homepage
repositoryhttps://github.com/vrishk/syserve/
max_upload_size
id365687
size45,553
Vrishab Krishna (vrishk)

documentation

README

syserve

Crates.io Crates.io

Simple Yew Server.

Inspired from devserver and the final project from the rust book as a simple, minimal development server tailored to yew and yew router apps.

This crate does not utilize any large server libraries like actix or rocket and is written using std::net with the httparse and threadpool libraries. Syserve is meant to be a minimal but featureful development server with HTTPS support (intended) and customization over file serving.

This should not be used in production.

Installation

$ cargo install syserve

Should install in less than a minute.

Usage

$ syserve -h
Usage:
  syserve [OPTIONS]

Minimal server for yew and yew-router apps

Optional arguments:
  -h,--help             Show this help message and exit
  -d,--dir DIR          Directory to serve (must contain index.html). Default: current directory
  -i,--index INDEX      Index file to be served. Default: index.html
  -n,--404,--not-found NOT_FOUND
                        File to be served in case of 404
  -a,--addr ADDR        Address at which files are served. Default: localhost
  -p,--port PORT        Port at which files are served. Default: 7878

Examples

$ syserve -d /path/to/dist/dir

where the dist/ dir contains an index.html file which loads the WASM file. Served at http://localhost:7878

Commit count: 24

cargo fmt