Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
refactor(main.rs): use local names for Router, get
Browse files Browse the repository at this point in the history
  • Loading branch information
nain-F49FF806 committed Jun 23, 2023
1 parent d7fceaf commit f3a5859
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// Copyright 2023 Naian G.
// SPDX-License-Identifier: Apache-2.0
use axum::{Router, routing::get};

#[tokio::main]
async fn main() {
println!("Hello, world!");
let app = axum::Router::new().route("/", axum::routing::get(|| async {"hey"}));
let app = Router::new().route("/", get(|| async {"hey"}));

axum::Server::bind(&"127.0.0.1:9999".parse().unwrap())
.serve(app.into_make_service())
Expand Down

0 comments on commit f3a5859

Please sign in to comment.