simple page
This commit is contained in:
16
src/main.rs
16
src/main.rs
@@ -1,3 +1,15 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
use axum::{
|
||||
routing::get,
|
||||
Router,
|
||||
};
|
||||
const host:&str = "0.0.0.0:8080";
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
println!("dash.core is running on");
|
||||
// build our application with a single route
|
||||
let app = Router::new().route("/", get(|| async { "dashcore is running" }));
|
||||
|
||||
// run our app with hyper, listening globally on port 3000
|
||||
let listener = tokio::net::TcpListener::bind(host).await.unwrap();
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user