From b49cb793b1870ef4fc6962badcc3d9bad86842f2 Mon Sep 17 00:00:00 2001 From: Alexander Baranov Date: Wed, 6 May 2026 14:59:55 +0300 Subject: [PATCH] =?UTF-8?q?smart-house-web:=20=D0=B2=20=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + smart-house-web/Cargo.toml | 9 ++++----- smart-house-web/backend/Cargo.toml | 9 +++++++++ smart-house-web/backend/src/main.rs | 10 ++++++++++ smart-house-web/src/main.rs | 3 --- 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 smart-house-web/backend/Cargo.toml create mode 100644 smart-house-web/backend/src/main.rs delete mode 100644 smart-house-web/src/main.rs diff --git a/.gitignore b/.gitignore index 6cb0886..21946af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.idea/ /**/.DS_Store +/tmp/ diff --git a/smart-house-web/Cargo.toml b/smart-house-web/Cargo.toml index 72360fd..bfe32f6 100644 --- a/smart-house-web/Cargo.toml +++ b/smart-house-web/Cargo.toml @@ -1,6 +1,5 @@ -[package] -name = "smart-house-web" -version = "0.1.0" -edition = "2024" +[workspace] +resolver = "3" +members = ["backend"] -[dependencies] +[workspace.dependencies] diff --git a/smart-house-web/backend/Cargo.toml b/smart-house-web/backend/Cargo.toml new file mode 100644 index 0000000..50d15ae --- /dev/null +++ b/smart-house-web/backend/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "backend" +version = "0.1.0" +edition = "2024" + +[dependencies] +axum = "0.8.9" +tracing = "0.1.44" +tracing-subscriber = "0.3.23" diff --git a/smart-house-web/backend/src/main.rs b/smart-house-web/backend/src/main.rs new file mode 100644 index 0000000..395ac74 --- /dev/null +++ b/smart-house-web/backend/src/main.rs @@ -0,0 +1,10 @@ +use tracing::info; + +fn main() { + // tracing_subscriber::fmt::init(); + let _s = tracing_subscriber::fmt() + .event_format(tracing_subscriber::fmt::format().compact()) + .init(); + info!("logger initialized"); + println!("Hello, world!"); +} diff --git a/smart-house-web/src/main.rs b/smart-house-web/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/smart-house-web/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -}