summaryrefslogtreecommitdiff
path: root/src/api.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api.mjs')
-rw-r--r--src/api.mjs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/api.mjs b/src/api.mjs
new file mode 100644
index 0000000..27a14b1
--- /dev/null
+++ b/src/api.mjs
@@ -0,0 +1,24 @@
+import { eq } from "./utils.mjs";
+import * as ircd from "./ircd.mjs";
+import * as web from "./web.mjs";
+
+export const main = async () => {
+ if (process.argv.length === 3 && process.argv[2] === "-V") {
+ console.log("papo 1970-01-01 0.1.0");
+ return;
+ }
+
+ if (process.argv[2] === "ircd") {
+ await ircd.app(process.argv[3]);
+ return;
+ }
+
+ if (process.argv[2] === "web") {
+ await web.app(process.argv[3]);
+ return;
+ }
+
+ console.log({
+ argv: process.argv,
+ });
+};