relay/src/rpc.ts

19 lines
549 B
TypeScript
Raw Normal View History

//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
import stringify from "json-stable-stringify";
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")) {
errorExit("Please set pocket-app-id and pocket-app-key config options.");
2022-07-19 22:31:15 +00:00
}
getRpcServer();
await startDns();
}