-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
52 lines (44 loc) · 1.33 KB
/
test.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
import user from "./models/user.js";
import email from "./models/emails.js";
import { sequelize, connection } from "./utils/connection.js";
// const find = user.findAll({
// where: {
// username: "jack",
// },
// });
// find.then((res) => {
// console.log(res[0].name);
// });
// user.findOne({ where: { username: "vavipa" } }).then((res) => console.log(res));
// import mailer from "nodemailer";
// const transport = mailer.createTransport({
// service: "gmail",
// auth: {
// user: "[email protected]",
// pass: process.env.MAIL_PASSWORD,
// },
// });
// const mailoptions = {
// from: "[email protected]",
// to: "[email protected]",
// subject: "checking nodemailer",
// html: "<h1>Hello Mitesh, I am vaibhav</h1>",
// };
// transport.sendMail(mailoptions, (err, info) => {
// if (err) throw err;
// console.log("Email sent: ", info.response);
// });
email.findAll().then((res) => {
// console.log(res);
console.log(res[0]);
});
// const date = new Date();
// date.setSeconds(0);
// // var str = `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
// var str2 = "12:12:00";
// var arr = str2.split(":");
// if (arr[0] == date.getHours() && arr[1] == date.getMinutes()) {
// console.log("It is true");
// }
// const newdate = new Date();
// console.log(newdate.getHours());