blob: 2da569fce1b6853db9893d62085cd1d0c04e416f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import * as IO from "fp-ts/IO";
import type { Publisher } from "./publisher";
import { readFileSync } from "fs";
export interface Config {
result_publishers: Publisher[];
dns: string[];
timeout: string;
}
export const readConfig =
(filePath: string): IO.IO<Config> =>
() => {
const confStr = readFileSync(filePath, "utf-8");
return JSON.parse(confStr);
};
|