Rust
Are you considering using Rust? Read this article: Why Rust in Production?.
https://crates.io/crates/applin - We provide this library to help your Rust HTTP server produce Applin pages.
Rust has many HTTP server libraries. Please let us know which one to add next: Feature Requests.
Servlin
You can use the https://crates.io/crates/servlin HTTP server for your Applin backend.
- Enable the
servlin
feature of theapplin
crate. - Use the
applin::applin_response
function to convert your page definition to aservlin::Response
struct with the proper content-type and JSON body. Example:#![allow(unused)] fn main() { pub const HELLO_PAGE_KEY: &str = "/hello"; pub fn hello_page() -> Response { applin_response(nav_page("Hello", scroll(form(text("Hello World!"))))) .unwrap() } }
- Remember to handle
GET
andPOST
for pages that have input widgets (variables). Example:#![allow(unused)] fn main() { ("GET" | "POST", account::NEW_ACCOUNT_PAGE_KEY) => Ok(account::new_account_page()), }