Files
ragflow/src/main.rs
Kould c6d0d85ab5 feat: impl dao (#1)
Co-authored-by: kould <2435992353@qq.com>
2023-12-13 12:32:01 +08:00

23 lines
468 B
Rust

mod api;
mod entity;
mod service;
use actix_web::{get, web, App, HttpServer, Responder};
#[get("/")]
async fn index() -> impl Responder {
"Hello, World!"
}
#[get("/{name}")]
async fn hello(name: web::Path<String>) -> impl Responder {
format!("Hello {}!", &name)
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().service(index).service(hello))
.bind(("127.0.0.1", 9090))?
.run()
.await
}