Crates.io | syserve |
lib.rs | syserve |
version | 0.3.0 |
source | src |
created_at | 2021-03-08 13:34:11.141486 |
updated_at | 2021-04-21 17:54:38.853482 |
description | Simple server for yew and yew-router apps |
homepage | |
repository | https://github.com/vrishk/syserve/ |
max_upload_size | |
id | 365687 |
size | 45,553 |
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.
$ cargo install syserve
Should install in less than a minute.
$ 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
$ 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