-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
31 lines (24 loc) · 893 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { code } from "./code.js";
import { code as makeComments } from "./makeComment.js";
import { code as users } from "./user.js";
import { code as comments } from "./comment.js";
import dotenv from "dotenv";
dotenv.config();
const coderes = await code();
// const j = JSON.stringify(coderes, null, 2);
// await fs.promises.writeFile("coderes.json", j);
const usersres = await users();
const makeCommentsres = await makeComments({
output: coderes,
users: usersres,
});
// console.log(
// commentsres.toComment.NECESSARY_FIELD.length,
// commentsres.toComment.ONGOING_NECESSARY_FIELD.length,
// commentsres.toComment.DUE_DATE_PASSED.length
// );
// const json = JSON.stringify(commentsres, null, 2);
// await fs.promises.writeFile("comments.json", json);
const commentsRes = await comments({ input: makeCommentsres });
console.log(commentsRes);
// console.log(res.message);