summaryrefslogtreecommitdiff
path: root/src/api.js
blob: 7f0991f5caa4132a8ad82d8b1b2b4ddc0e3f4796 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const { eq } = require("./utils.js");
const ircd = require("./ircd.js");
const web  = require("./web.js");

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,
	});
};

module.exports = {
	main,
};