*Consolidate all start functions to the main entry boot
This commit is contained in:
parent
650666515b
commit
dc7bc3c5c4
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue