SHE LIVES!
This commit is contained in:
@@ -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.
|
||||
}
|
||||
Reference in New Issue
Block a user