12345678910111213141516171819202122232425262728293031323334353637 |
- const mysql = require('mysql');
- const nodemailer = require('nodemailer');
- const transporter = nodemailer.createTransport({
- host: process.env.CLOUDRON_MAIL_SMTP_SERVER,
- port: process.env.CLOUDRON_MAIL_SMTP_PORT,
- secure: false,
- auth: {
- user: process.env.CLOUDRON_MAIL_SMTP_USERNAME,
- pass: process.env.CLOUDRON_MAIL_SMTP_PASSWORD
- },
- });
- const connection = mysql.createConnection({
- host: 'localhost',
- user: 'root',
- password: 'your_new_password1!Q',
- database: 'community_rule',
- });
- connection.connect((err) => {
- if (err) throw err;
- console.log('Connected to the database');
- });
- module.exports = connection, transporter;
|