From 3fbb68d3494d3eba2331a8b9fab82ca303814be7 Mon Sep 17 00:00:00 2001 From: LinlyBoi Date: Sun, 17 Dec 2023 21:51:05 +0200 Subject: [PATCH] dotenv thingy --- src/main.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0df93de..81208d9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,5 @@ use actix_web::{get, post, web, App, HttpResponse, HttpServer, Responder}; - -#[get("/")] -async fn hello() -> impl Responder { - HttpResponse::Ok().body("Hello world!") -} +use dotenv::dotenv; #[post("/echo")] async fn echo(req_body: String) -> impl Responder { @@ -16,6 +12,7 @@ async fn manual_hello() -> impl Responder { #[actix_web::main] async fn main() -> std::io::Result<()> { + dotenv().ok(); HttpServer::new(|| { App::new() .service(hello)