🗝
summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authormia <mia@mia.jetzt>2024-04-16 19:05:41 -0700
committermia <mia@mia.jetzt>2024-04-16 19:05:41 -0700
commit796b2cafc798a7faa80a007002831a4c40635fe8 (patch)
treed8e68590524f4adab7ff8ff6e2cb3dfbb0c64b37 /src/main.rs
downloaddissociate-0.1.0.tar.gz
dissociate-0.1.0.zip
initial commit v0.1.0
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..936f37c
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,12 @@
+mod ipc;
+mod server;
+mod tui;
+
+#[tokio::main]
+async fn main() -> eyre::Result<()> {
+    match std::env::args().skip(1).next().as_deref() {
+        Some("serve") | None => server::serve().await,
+        Some("ctl") => tui::run(),
+        _ => Err(eyre::eyre!("unknown command")),
+    }
+}