2022-03-16 21:02:34 +00:00
|
|
|
import "dotenv/config";
|
|
|
|
import fs from "fs";
|
2022-03-26 00:36:50 +00:00
|
|
|
import { databaseReadWithReadCredentials } from "../database/database-wrapper";
|
2022-03-16 21:02:34 +00:00
|
|
|
|
|
|
|
let main = async () => {
|
|
|
|
let json = await databaseReadWithReadCredentials({ group: "combined" });
|
|
|
|
let string = JSON.stringify(json, null, 2);
|
|
|
|
let filename = "metaforecasts.json";
|
|
|
|
fs.writeFileSync(filename, string);
|
|
|
|
console.log(`File downloaded to ./${filename}`);
|
|
|
|
};
|
|
|
|
main();
|