-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.js
179 lines (179 loc) · 3.89 KB
/
init.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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
const mongoose=require("mongoose");
const chat = require("./models/chat");
main().then(()=>{
console.log("connected sucessfully ")
})
.catch((err)=>console.log(err));
async function main(){
await mongoose.connect('mongodb://127.0.0.1:27017/whatsapp');
}
let allchat=[{
from:"neha",
to:"priya",
msg:"hii what are you doing right now baby",
createdat:new Date(),
},
{
from: "rahul",
to: "ankit",
msg: "Let's catch up sometime this week.",
createdat: new Date()
},
{
from: "alex",
to: "sam",
msg: "Did you finish the project?",
createdat: new Date()
},
{
from: "maria",
to: "john",
msg: "Happy Birthday, John!",
createdat: new Date()
},
{
from: "lisa",
to: "mike",
msg: "Can you send me the report by EOD?",
createdat: new Date()
},
{
from: "emma",
to: "olivia",
msg: "Are we still on for dinner tonight?",
createdat: new Date()
},
{
from: "liam",
to: "noah",
msg: "Don't forget our meeting tomorrow.",
createdat: new Date()
},
{
from: "ava",
to: "sophia",
msg: "I'll be a bit late today.",
createdat: new Date()
},
{
from: "isabella",
to: "mia",
msg: "Can you help me with the assignment?",
createdat: new Date()
},
{
from: "ethan",
to: "logan",
msg: "See you at the gym.",
createdat: new Date()
},
{
from: "sophia",
to: "jackson",
msg: "How was your weekend?",
createdat: new Date()
},
{
from: "oliver",
to: "lucas",
msg: "Let's plan for the trip.",
createdat: new Date()
},
{
from: "amelia",
to: "harper",
msg: "Congrats on your promotion!",
createdat: new Date()
},
{
from: "charlotte",
to: "evelyn",
msg: "Do you have the notes from class?",
createdat: new Date()
},
{
from: "james",
to: "aiden",
msg: "I'll call you in an hour.",
createdat: new Date()
},
{
from: "scarlett",
to: "abigail",
msg: "Are you free this weekend?",
createdat: new Date()
},
{
from: "daniel",
to: "joshua",
msg: "Can we reschedule our meeting?",
createdat: new Date()
},
{
from: "ella",
to: "grace",
msg: "I'll send you the files soon.",
createdat: new Date()
},
{
from: "matthew",
to: "henry",
msg: "Do you have any updates?",
createdat: new Date()
},
{
from: "chloe",
to: "penelope",
msg: "Let's go for a coffee break.",
createdat: new Date()
},
{
from: "sebastian",
to: "leo",
msg: "Can you review this document?",
createdat: new Date()
},
{
from: "victoria",
to: "riley",
msg: "How's your project going?",
createdat: new Date()
},
{
from: "grace",
to: "lyla",
msg: "Can we talk later?",
createdat: new Date()
},
{
from: "jackson",
to: "owen",
msg: "Are you joining the meeting?",
createdat: new Date()
},
{
from: "mila",
to: "sofia",
msg: "Let's have lunch together.",
createdat: new Date()
},
{
from: "aiden",
to: "elijah",
msg: "Can you help me with this task?",
createdat: new Date()
},
{
from: "levi",
to: "wyatt",
msg: "I'll be there in 10 minutes.",
createdat: new Date()
},
{
from: "zoe",
to: "stella",
msg: "Have you seen this movie?",
createdat: new Date()
},
];
chat.insertMany(allchat);