mirror of
https://github.com/wahyd4/upptime.git
synced 2026-08-18 17:46:21 +10:00
👷 Add YAML parser
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { readFile } from "fs-extra";
|
||||
import { safeLoad } from "js-yaml";
|
||||
import { join } from "path";
|
||||
|
||||
export const update = async () => {
|
||||
const config = safeLoad(
|
||||
await readFile(join(".", ".statusrc.yml"), "utf8")
|
||||
) as { sites: string[] };
|
||||
for await (const url of config.sites) {
|
||||
console.log("Checking", url);
|
||||
}
|
||||
};
|
||||
|
||||
update();
|
||||
Reference in New Issue
Block a user