From 8ae986f2b7276861b96498c7dc96759da2e89752 Mon Sep 17 00:00:00 2001 From: myyrakle Date: Mon, 2 Sep 2024 23:35:26 +0900 Subject: [PATCH] =?UTF-8?q?[#108]=20v0.9.0=20=EB=B2=84=EC=A0=84=20?= =?UTF-8?q?=EC=A1=B0=EC=A0=95=20=EB=B0=8F=20=EB=AC=B8=EC=84=9C=ED=99=94=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 ++++---------- rupring/Cargo.toml | 2 +- rupring/src/lib.rs | 9 ++------- rupring_example/Cargo.toml | 2 +- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 77a990e..935a9dc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # rupring -![](https://img.shields.io/badge/language-Rust-red) ![](https://img.shields.io/badge/version-0.8.2-brightgreen) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/myyrakle/rupring/blob/master/LICENSE) +![](https://img.shields.io/badge/language-Rust-red) ![](https://img.shields.io/badge/version-0.9.0-brightgreen) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/myyrakle/rupring/blob/master/LICENSE) spring on rust @@ -8,8 +8,7 @@ spring on rust required dependency list ```toml -rupring = "0.8.2" -tokio = { version = "1", features = ["full"] } +rupring = "0.9.0" serde = { version="1.0.193", features=["derive"] } ``` @@ -34,13 +33,8 @@ pub fn echo(request: rupring::Request) -> rupring::Response { rupring::Response::new().text(request.body) } -#[tokio::main] -async fn main() -> Result<(), Box> { - let app = rupring::RupringFactory::create(RootModule {}); - - app.listen(3000).await?; - - Ok(()) +fn main() { + rupring::run(RootModule {}) } ``` diff --git a/rupring/Cargo.toml b/rupring/Cargo.toml index 460968b..ac1c9b0 100644 --- a/rupring/Cargo.toml +++ b/rupring/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rupring" -version = "0.8.2" +version = "0.9.0" edition = "2021" license = "MIT" authors = ["myyrakle "] diff --git a/rupring/src/lib.rs b/rupring/src/lib.rs index 61fd83e..187fae1 100644 --- a/rupring/src/lib.rs +++ b/rupring/src/lib.rs @@ -24,13 +24,8 @@ pub fn echo(request: rupring::Request) -> rupring::Response { rupring::Response::new().text(request.body) } -#[tokio::main] -async fn main() -> Result<(), Box> { - let app = rupring::RupringFactory::create(RootModule {}); - - app.listen(3000).await?; - - Ok(()) +fn main() { + rupring::run(RootModule {}) } ``` diff --git a/rupring_example/Cargo.toml b/rupring_example/Cargo.toml index bb3b923..72864b6 100644 --- a/rupring_example/Cargo.toml +++ b/rupring_example/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -rupring={ version="0.8.1", path="../rupring" } +rupring={ version="0.9.0", path="../rupring" } serde = { version="1.0.193", features=["derive"] } \ No newline at end of file