From 22440597da3b3a520dd93a0e665d9139f2b80c1c Mon Sep 17 00:00:00 2001 From: WanderingPenwing Date: Mon, 2 Sep 2024 20:26:41 +0200 Subject: [PATCH] added file path debug --- src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.rs b/src/main.rs index 7b481d0..58e8f81 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,7 @@ use std::fs; use std::time::Duration; use serde::Deserialize; use wake_on_lan; +use std::env; #[derive(Deserialize)] struct WakeQuery { @@ -136,6 +137,13 @@ async fn wake(query: web::Query) -> impl Responder { #[actix_web::main] async fn main() -> std::io::Result<()> { + let current_dir = env::current_dir().expect("Failed to get current directory"); + // Construct the path to the file + let file_path = current_dir.join("pages/common.html"); + + // Print the path + println!("Attempting to read from: {:?}", file_path); + println!("yuya started"); let result = HttpServer::new(|| { App::new()