dotenv thingy

This commit is contained in:
LinlyBoi
2023-12-17 21:51:05 +02:00
parent 1356d8cf48
commit 3fbb68d349

View File

@@ -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)