init
This commit is contained in:
commit
31c9c600b0
59 changed files with 47825 additions and 0 deletions
11
backend/Cargo.toml
Normal file
11
backend/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "backend"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
repository.workspace = true
|
||||
authors.workspace = true
|
||||
readme.workspace = true
|
||||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
moon.workspace = true
|
2
backend/private/.gitignore
vendored
Normal file
2
backend/private/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
16
backend/src/main.rs
Normal file
16
backend/src/main.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
use moon::*;
|
||||
|
||||
async fn frontend() -> Frontend {
|
||||
Frontend::new().title("FastWave").append_to_head(concat!(
|
||||
"<style>",
|
||||
include_str!("../style.css"),
|
||||
"</style>"
|
||||
))
|
||||
}
|
||||
|
||||
async fn up_msg_handler(_: UpMsgRequest<()>) {}
|
||||
|
||||
#[moon::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
start(frontend, up_msg_handler, |_| {}).await
|
||||
}
|
3
backend/style.css
Normal file
3
backend/style.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
html {
|
||||
background-color: DarkSlateBlue;
|
||||
}
|
Reference in a new issue