diff options
-rw-r--r-- | Cargo.toml | 8 | ||||
-rw-r--r-- | Rocket.toml | 23 | ||||
-rw-r--r-- | src/main.rs | 15 |
3 files changed, 46 insertions, 0 deletions
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 <haraldei@anduin.net>"] + +[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(); +} |