Crates.io | heart |
lib.rs | heart |
version | |
source | src |
created_at | 2024-11-18 14:41:33.439345 |
updated_at | 2024-11-30 00:44:24.055223 |
description | Hypermedia-based web development of the 1990 future! |
homepage | https://github.com/luciusmagn/heart |
repository | https://github.com/luciusmagn/heart |
max_upload_size | |
id | 1452245 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A Rust-based web stack combining powerful libraries for building modern, efficient web applications.
Add to your Cargo.toml
:
[dependencies]
heart = "0.1.20"
use tokio;
use heart::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init();
let route = warp::path("hello")
.map(|| {
let markup = html! {
h1 { "Hello, Heart Stack!" }
p { "This is a tiny example." }
};
info!("Serving hello route");
Response::builder()
.header("Content-Type", "text/html")
.body(markup.into_string())
});
info!("Starting server on http://localhost:3030");
warp::serve(route)
.run(([127, 0, 0, 1], 3030))
.await;
Ok(())
}
Contributions are welcome! Please follow Kant's categorical imperative.
Fair License (2024)
Copyright (c) 2024 Lukáš Hozda
Usage of the software is PERMITTED, modification and redistribution are PERMITTED,
however all versions of the derived code MUST be clearly marked as such
and NOT represented as the original software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.