웹서버1 Rust 간단한 웹서버 HttpServer 올리기 제목 그대로 간단하게 Rust로 웹서버 올리기 - hello world! 찍어보기 프로젝트 생성 $ cargo new rust-actix-api Cargo.toml 에 crate 추가 [dependencies] actix-web = "3.3.2" main.rs 수정 use actix_web::{web, App, HttpResponse, HttpServer, Responder}; async fn index() -> impl Responder { HttpResponse::Ok().body("Hello world!") } async fn get_data(web::Path(id): web::Path) -> impl Responder { let data = format!("get_data {id}"); HttpR.. 2023. 4. 19. 이전 1 다음