Skip to content

vrishk/syserve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple server for yew and yew-router apps

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages