Created
December 21, 2023 06:09
-
-
Save Enigo/9bfdc002bd3c4daa92d1ca45461dc6bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[actix_web::main] | |
async fn main() -> std::io::Result<()> { | |
let pool = db_handler::create_pool().await; | |
HttpServer::new(move || { | |
App::new() | |
.app_data(Data::new(pool.clone())) | |
.service(search_controller::get_search_results) | |
}) | |
.bind(("127.0.0.1", 8080))? | |
.run() | |
.await | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment