summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-05-10 18:57:59 +1200
committerArslaan Pathan <[email protected]>2026-05-10 18:57:59 +1200
commit39582a268399762fe57764891cbd09ca7f434ae4 (patch)
tree7046ba8076f606d70b1f811e712e2489caea78fc /main.c
downloadihatewayland-main.tar.xz
ihatewayland-main.zip
initial commitHEADmain
Diffstat (limited to 'main.c')
-rw-r--r--main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..8690777
--- /dev/null
+++ b/main.c
@@ -0,0 +1,18 @@
+#include <beaker.h>
+#include <stdio.h>
+
+int index_handler(UrlParams* params) {
+ send_response("Hello, World!");
+ return 0;
+}
+
+int main() {
+ set_handler("/", index_handler);
+ int result = beaker_run("0.0.0.0", 8080);
+
+ if (result != 0) {
+ fprintf(stderr, "ERROR: beaker failed to start (T_T)\n");
+ return 1;
+ }
+ return 0;
+}