From c36bf8e3577da31cf6d575879c7e92d3e9c7e4f1 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 23 Feb 2024 06:05:19 -0300 Subject: Big cleanup - delete all SQLite Node-API code: we'll use the C++ one instead; - implement hero.mjs, with tests! - use ESM all over. --- src/api.mjs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/api.mjs (limited to 'src/api.mjs') 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, + }); +}; -- cgit v1.2.3