about summary refs log tree commit diff
path: root/corp/rih/backend/src/main.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-06-06T11·35+0300
committertazjin <tazjin@tvl.su>2023-06-06T11·43+0000
commit896034cc94b09d6efc1eba6bb2fdad03269ff369 (patch)
treecef7bdae0aa2963658bc4410a700b0bd37b1cacb /corp/rih/backend/src/main.rs
parent5dee4780dab5e22eb2929a3b4287c5a781fc20f9 (diff)
chore(corp/rih): bootstrap backend application with rouille r/6238
Change-Id: I48b0c432a843db5a44b3a3de09f18e1232644a44
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8715
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'corp/rih/backend/src/main.rs')
-rw-r--r--corp/rih/backend/src/main.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/corp/rih/backend/src/main.rs b/corp/rih/backend/src/main.rs
new file mode 100644
index 000000000000..719d3c19af67
--- /dev/null
+++ b/corp/rih/backend/src/main.rs
@@ -0,0 +1,8 @@
+use rouille::{Request, Response};
+use std::env;
+
+fn main() {
+    let port = env::var("PORT").unwrap_or_else(|_| /* rihb = */ "7442".to_string());
+    let listen = format!("0.0.0.0:{port}");
+    rouille::start_server(&listen, move |_request| Response::text("hello world"));
+}