aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2017-10-01 16:13:38 +0200
committerHarald Eilertsen <haraldei@anduin.net>2017-10-01 16:13:38 +0200
commite5c71b08508db22a9fae50c73ad82d9d0dcd2550 (patch)
tree57773f96e79bb5b9fa61eb1f6bc0507ae285446c
downloadrocket-blog-e5c71b08508db22a9fae50c73ad82d9d0dcd2550.tar.gz
rocket-blog-e5c71b08508db22a9fae50c73ad82d9d0dcd2550.tar.bz2
rocket-blog-e5c71b08508db22a9fae50c73ad82d9d0dcd2550.zip
Initial launch!
-rw-r--r--Cargo.toml8
-rw-r--r--Rocket.toml23
-rw-r--r--src/main.rs15
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();
+}