2022-07-24 03:16:34 +00:00
|
|
|
//const require = createRequire(import.meta.url);
|
|
|
|
//import { createRequire } from "module";
|
|
|
|
|
2022-07-23 06:48:02 +00:00
|
|
|
import { start as startDns } from "./dns.js";
|
2022-08-24 17:05:38 +00:00
|
|
|
import config from "./config.js";
|
2022-08-27 01:52:19 +00:00
|
|
|
import { errorExit } from "./error.js";
|
2022-08-03 06:02:40 +00:00
|
|
|
// @ts-ignore
|
|
|
|
import stringify from "json-stable-stringify";
|
2022-08-27 01:52:19 +00:00
|
|
|
import { getRpcServer } from "./rpc/server.js";
|
2022-07-04 23:17:58 +00:00
|
|
|
|
2022-06-27 17:53:00 +00:00
|
|
|
export async function start() {
|
2022-07-19 22:31:15 +00:00
|
|
|
if (!config.str("pocket-app-id") || !config.str("pocket-app-key")) {
|
2022-08-24 17:05:38 +00:00
|
|
|
errorExit("Please set pocket-app-id and pocket-app-key config options.");
|
2022-07-19 22:31:15 +00:00
|
|
|
}
|
|
|
|
|
2022-08-27 01:52:19 +00:00
|
|
|
getRpcServer();
|
2022-07-23 06:48:02 +00:00
|
|
|
await startDns();
|
2022-07-23 00:58:32 +00:00
|
|
|
}
|