Skip to content

Instantly share code, notes, and snippets.

@Enigo
Created December 21, 2023 06:09
Show Gist options
  • Save Enigo/9bfdc002bd3c4daa92d1ca45461dc6bd to your computer and use it in GitHub Desktop.
Save Enigo/9bfdc002bd3c4daa92d1ca45461dc6bd to your computer and use it in GitHub Desktop.
#[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