-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.js
More file actions
123 lines (119 loc) · 3.15 KB
/
init.js
File metadata and controls
123 lines (119 loc) · 3.15 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
const mongoose = require('mongoose');
const Chat = require("./models/chat.js");
main()
.then(()=>{
console.log("connection sucessfull");
})
.catch((err) => console.log(err));
async function main() {
await mongoose.connect('mongodb://127.0.0.1:27017/chatapp');
}
let allchats = [
{
from: "Emily",
to: "Daniel",
msg: "Good morning, Daniel. Could you please review the report I sent yesterday?",
created_at: new Date()
},
{
from: "Daniel",
to: "Emily",
msg: "Good morning, Emily. I'll review the report and get back to you by this afternoon.",
created_at: new Date()
},
{
from: "Michael",
to: "Sarah",
msg: "Sarah, I need your input on the new project proposal. Can we discuss it today?",
created_at: new Date()
},
{
from: "Sarah",
to: "Michael",
msg: "Sure, Michael. Let's schedule a meeting for 2 PM.",
created_at: new Date()
},
{
from: "Alex",
to: "Karen",
msg: "Karen, please update the client on the progress of their order.",
created_at: new Date()
},
{
from: "Karen",
to: "Alex",
msg: "Will do, Alex. I'll send them an email right away.",
created_at: new Date()
},
{
from: "Laura",
to: "James",
msg: "James, can you provide feedback on the draft by EOD?",
created_at: new Date()
},
{
from: "James",
to: "Laura",
msg: "Sure, Laura. I'll review the draft and share my comments by the end of the day.",
created_at: new Date()
},
{
from: "David",
to: "Sophia",
msg: "Sophia, can you join the client call at 3 PM?",
created_at: new Date()
},
{
from: "Sophia",
to: "David",
msg: "Yes, David. I'll be there.",
created_at: new Date() },
{
from: "Oliver",
to: "Emma",
msg: "Emma, please make sure the presentation is ready for tomorrow's meeting.",
created_at: new Date()
},
{
from: "Emma",
to: "Oliver",
msg: "Understood, Oliver. I'll finalize the presentation today.",
created_at: new Date()
}, {
from: "John",
to: "Alice",
msg: "Alice, can you confirm the venue for the conference?",
created_at: new Date()
},
{
from: "Alice",
to: "John",
msg: "Yes, John. The venue is confirmed. I'll send you the details shortly.",
created_at: new Date()
},
{
from: "Robert",
to: "Megan",
msg: "Megan, could you prepare the budget report for the next quarter?",
created_at: new Date()
},
{
from: "Megan",
to: "Robert",
msg: "Sure, Robert. I'll have it ready by the end of this week.",
created_at: new Date()
},
{
from: "Christine",
to: "Mark",
msg: "Mark, we need to finalize the agenda for tomorrow's meeting.",
created_at: new Date()
},
{
from: "Mark",
to: "Christine",
msg: "I'll work on it and send you a draft by this afternoon.",
created_at: new Date()
}
]
Chat.insertMany(allchats);