SHE LIVES!

This commit is contained in:
2025-02-13 15:08:59 -05:00
parent d2e6c51073
commit 09dc73663d
11 changed files with 573 additions and 80 deletions

View File

@@ -6,9 +6,15 @@ use soda::prelude::*;
#[tokio::main]
fn main() {
let app = PageBase("Test Page",
Tag::Heading1("hi!")
async fn main() {
let page = PageBase("Test Page",
(
Tag::Heading1("Hello, World!"),
Tag::Paragraph("This is a test of Soda, an ultrafast composable frontend framework built in Rust!")
)
);
Server::new((0.0.0.0, 3000)).unwrap().serve(app).await;
let app = page.route();
Server::new(([0, 0, 0, 0], 3000)).await.unwrap().serve(app, ()).await.unwrap();
// weird rustc bug: if the second argument is omitted, rustc gets stuck in a recursion trying to figure out what type State is
// *before* exiting on the error produced by the missing argument. this consumes cpu and slowly eats ram until it OOMs or you kill it.
}