From 2140577b3f1c435b8200ae0a5d564897f3ffcca5 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 8 Feb 2024 12:24:24 +0100 Subject: [PATCH] setting up rocket hello world, readme change, license removal --- Cargo.toml | 11 ++++++----- LICENSE | 9 --------- README.md | 4 ++-- src/main.rs | 12 ++++++++++-- 4 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 LICENSE diff --git a/Cargo.toml b/Cargo.toml index 0543e1f..3ec4fb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,16 +1,17 @@ [package] -name = "template" +name = "ganar" version = "0.1.0" edition = "2021" publish = false authors = ["Christoph J. Scherr "] license = "MIT" -description = "No description yet" +description = "ganar" readme = "README.md" -homepage = "https://git.cscherr.de/PlexSheep/rs-base" -repository = "https://git.cscherr.de/PlexSheep/rs-base" -keywords = ["template"] +homepage = "https://git.cscherr.de/PlexSheep/ganar" +repository = "https://git.cscherr.de/PlexSheep/ganar" +keywords = ["website"] [dependencies] +rocket = "0.5.0" diff --git a/LICENSE b/LICENSE deleted file mode 100644 index b8a4560..0000000 --- a/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2024 PlexSheep - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index a27185f..e048646 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# rs-base +# ganar2 -Base repository for rust projects \ No newline at end of file +Rust webapp that runs www.cscherr.de (eventually) diff --git a/src/main.rs b/src/main.rs index e7a11a9..5411c6b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,11 @@ -fn main() { - println!("Hello, world!"); +#[macro_use] extern crate rocket; + +#[get("/")] +fn index() -> &'static str { + "Hello, world!" +} + +#[launch] +fn rocket() -> _ { + rocket::build().mount("/", routes![index]) }