updated
This commit is contained in:
19
Sean/modules/mysql.js
Normal file
19
Sean/modules/mysql.js
Normal file
@ -0,0 +1,19 @@
|
||||
const mysqlConfig = {
|
||||
host: process.env.host,
|
||||
user: process.env.user,
|
||||
password: process.env.password,
|
||||
database: process.env.database,
|
||||
timezone: "Z", // Set the timezone to UTC
|
||||
};
|
||||
|
||||
const connection = mysql.createConnection(mysqlConfig);
|
||||
connection.connect((err) => {
|
||||
if (err) {
|
||||
console.error("Error connecting to MySQL:", err);
|
||||
return;
|
||||
}
|
||||
console.log("Connected to MySQL");
|
||||
});
|
||||
|
||||
|
||||
module.exports = { connection , mysqlConfig };
|
13
Sean/modules/nodeMailer.js
Normal file
13
Sean/modules/nodeMailer.js
Normal file
@ -0,0 +1,13 @@
|
||||
const transporter = nodemailer.createTransport({
|
||||
service: 'gmail',
|
||||
host: 'smtp.gmail.com',
|
||||
port: 587, // use the appropriate port for your SMTP server
|
||||
secure: false, // true for 465, false for other ports
|
||||
auth: {
|
||||
user: process.env.euser,
|
||||
pass: process.env.epass
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
module.exports = { transporter } ;
|
Reference in New Issue
Block a user