warp-tpl is a simple template for rust warp web framework.
├─app
│ │ Cargo.toml
│ │
│ └─src
│ │ auth.rs
│ │ errors.rs
│ │ main.rs
│ │ state.rs
│ │ views.rs
│ │
│ └─views
│ index.rs
│
└─macros
│ Cargo.toml
│
└─src
lib.rs
macrosproc crate to convertasync fn xxx() -> Result<_, OtherError>toasync fn xxx() -> Result<_, Rejection>which is required inwarp. Typically you could ignore this crate.appin which you write your web code.app/src/auth.rsexample for app authorization.app/src/errors.rscontains user defined errors and code required to generatewarp::Replyapp/src/state.rsplace app state like database or config used in route function in this file.app/src/views.rsregister your api route inbuild_filter.app/src/views/*.rsapp route goes here.app/src/main.rsentry of your app, init config, connect to database, etc.
git clone https://github.com/tyan-boot/warp-tplthen write your code in app.
PRs and issues are welcome.