*Consolidate all start functions to the main entry boot

This commit is contained in:
Derrick Hammer 2022-09-21 08:55:35 -04:00
parent 650666515b
commit dc7bc3c5c4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 6 additions and 2 deletions

View File

@ -1,14 +1,20 @@
import { start as startRpc } from "./rpc.js"; import { start as startRpc } from "./rpc.js";
import { start as startRelay } from "./relay.js"; import { start as startRelay } from "./relay.js";
import { start as startApp } from "./app";
import log from "loglevel"; import log from "loglevel";
import config from "./config.js"; import config from "./config.js";
import { loadPlugins } from "./plugin.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")); log.setDefaultLevel(config.str("log-level"));
async function boot() { async function boot() {
await loadPlugins(); await loadPlugins();
await startApp();
await startRpc(); await startRpc();
await startDns();
await startSSl();
await startRelay(); await startRelay();
} }

View File

@ -1,7 +1,6 @@
//const require = createRequire(import.meta.url); //const require = createRequire(import.meta.url);
//import { createRequire } from "module"; //import { createRequire } from "module";
import { start as startDns } from "./dns.js";
import config from "./config.js"; import config from "./config.js";
import { errorExit } from "./error.js"; import { errorExit } from "./error.js";
// @ts-ignore // @ts-ignore
@ -14,5 +13,4 @@ export async function start() {
} }
getRpcServer(); getRpcServer();
await startDns();
} }