metaforecast/src/backend/manual/manualDownload.ts

15 lines
413 B
TypeScript
Raw Normal View History

import 'dotenv/config';
import fs from 'fs';
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();