diff options
author | EuAndreh <eu@euandre.org> | 2023-11-11 06:10:57 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-11-11 06:13:43 -0300 |
commit | e912b1945c0544f60a5f118f86742d9a7b1b66b7 (patch) | |
tree | 92d6e75a9bb2dada2f58dcbf4f9bd1180c30ed7b /src/api.js | |
parent | TODOs.md: Add #td-d27aca11-9449-bb0e-08cb-2a8ef9778a11 (diff) | |
download | papod-e912b1945c0544f60a5f118f86742d9a7b1b66b7.tar.gz papod-e912b1945c0544f60a5f118f86742d9a7b1b66b7.tar.xz |
src/{ircd,web}.js: Init stub servers
Diffstat (limited to 'src/api.js')
-rw-r--r-- | src/api.js | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -1,14 +1,25 @@ const { eq } = require("./utils.js"); +const ircd = require("./ircd.js"); +const web = require("./web.js"); -const main = async () => { - if (process.argv.length !== 2) { +const main = () => { + if (process.argv.length === 3 && process.argv[2] === "-V") { console.log("papo 1970-01-01 0.1.0"); return; } + if (process.argv[2] === "ircd") { + ircd.app(process.argv[3]); + return; + } + + if (process.argv[2] === "web") { + web.app(process.argv[3]); + return; + } + console.log({ argv: process.argv, - eq: eq({a: 1}, {a: 1}), }); }; |