From dc7bc3c5c43d63085fd095838ff9cce53a87fa08 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 21 Sep 2022 08:55:35 -0400 Subject: [PATCH] *Consolidate all start functions to the main entry boot --- src/index.ts | 6 ++++++ src/rpc.ts | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index c4cf2e1..b655103 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,20 @@ import { start as startRpc } from "./rpc.js"; import { start as startRelay } from "./relay.js"; +import { start as startApp } from "./app"; import log from "loglevel"; import config from "./config.js"; import { loadPlugins } from "./plugin.js"; +import { start as startDns } from "./dns.js"; +import { start as startSSl } from "./ssl.js"; log.setDefaultLevel(config.str("log-level")); async function boot() { await loadPlugins(); + await startApp(); await startRpc(); + await startDns(); + await startSSl(); await startRelay(); } diff --git a/src/rpc.ts b/src/rpc.ts index b5903b1..eeb3811 100644 --- a/src/rpc.ts +++ b/src/rpc.ts @@ -1,7 +1,6 @@ //const require = createRequire(import.meta.url); //import { createRequire } from "module"; -import { start as startDns } from "./dns.js"; import config from "./config.js"; import { errorExit } from "./error.js"; // @ts-ignore @@ -14,5 +13,4 @@ export async function start() { } getRpcServer(); - await startDns(); }