From e5c71b08508db22a9fae50c73ad82d9d0dcd2550 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 1 Oct 2017 16:13:38 +0200 Subject: Initial launch! --- Cargo.toml | 8 ++++++++ Rocket.toml | 23 +++++++++++++++++++++++ src/main.rs | 15 +++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 Cargo.toml create mode 100644 Rocket.toml create mode 100644 src/main.rs diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..c543d3b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "rocket-blog" +version = "0.1.0" +authors = ["Harald Eilertsen "] + +[dependencies] +rocket = "0.3.3" +rocket_codegen = "0.3.3" diff --git a/Rocket.toml b/Rocket.toml new file mode 100644 index 0000000..3c50ddd --- /dev/null +++ b/Rocket.toml @@ -0,0 +1,23 @@ +[development] +address = "0.0.0.0" +port = 8000 +#workers = [number of cpus * 2] +log = "normal" +#secret_key = [randomly generated at launch] +limits = { forms = 32768 } + +[staging] +address = "0.0.0.0" +port = 80 +#workers = [number of cpus * 2] +log = "normal" +#secret_key = [randomly generated at launch] +limits = { forms = 32768 } + +[production] +address = "0.0.0.0" +port = 80 +#workers = [number of cpus * 2] +log = "critical" +#secret_key = [randomly generated at launch] +limits = { forms = 32768 } diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..03966fc --- /dev/null +++ b/src/main.rs @@ -0,0 +1,15 @@ +#![feature(plugin)] +#![plugin(rocket_codegen)] + +extern crate rocket; + +#[get("/")] +fn index() -> &'static str { + "Hello, for faen!" +} + +fn main() { + rocket::ignite() + .mount("/", routes![index]) + .launch(); +} -- cgit v1.2.3