#hyper #web-server #create

bin+lib hyperap

Hyperap - Hyper wrapper. A very minimal wrapper for Hyper.rs to create a working webserver.

4 releases (breaking)

Uses old Rust 2015

0.4.0 Feb 10, 2018
0.3.0 Feb 10, 2018
0.2.0 Feb 4, 2018
0.1.0 Feb 3, 2018

#253 in #hyper

MIT license

11KB
243 lines

Hyperap

Hyperap - Hyper wrapper. A very minimal wrapper for Hyper.rs to create a working webserver.

How To Use

code refer to ./src/main.rs

to see how it works

git clone https://github.com/nghenglim/hyperap
cd hyperap
cargo run

NOTE

  • Currently using hyper 0.11 branch which is async in nature, however coding in async will not clean unless the async/await rust feature come out
  • No point on creating synchronous version of rust webserver because NodeJS/Java/Go webserver is asynchronous version.

TODO

  • more functional on the add_route
  • route is able to specify the GET/POST definition, do validation before go into controller
  • all the routing is able to generate into a swagger file

Dependencies

~9MB
~148K SLoC