updated the mongodb on server and db config
This commit is contained in:
parent
6549e50b87
commit
2e3e78b632
@ -2,7 +2,7 @@ import mongoose from 'mongoose';
|
||||
|
||||
export async function connectDB() {
|
||||
try {
|
||||
await mongoose.connect(process.env.MONGODB_URI, { dbName: 'crawlerX' });
|
||||
await mongoose.connect(process.env.MONGODB_URI, { dbName: 'metatronadmin_backend' });
|
||||
console.log('✅ MongoDB connected');
|
||||
} catch (err) {
|
||||
console.error('❌ MongoDB connection error:', err);
|
||||
|
||||
@ -53,7 +53,7 @@ app.get("/", (_req, res) => {
|
||||
} else {
|
||||
return res
|
||||
.type("text/plain")
|
||||
.send("CrawlerX backend is running.");
|
||||
.send("Metatron backend is running.");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
import nodemailer from "nodemailer";
|
||||
import juice from "juice";
|
||||
//import juice from "juice";
|
||||
//
|
||||
// Create reusable transporter object
|
||||
//
|
||||
export const mailer = nodemailer.createTransport({
|
||||
host: "mail.crawlerx.co", // your Hestia mail host
|
||||
host: "mail.metatron-admin-backend.metatronhost.com", // your Hestia mail host
|
||||
port: 587, // STARTTLS
|
||||
secure: false, // must be false for 587
|
||||
auth: {
|
||||
user: "info@crawlerx.co", // e.g. info@crawlerx.co
|
||||
pass: "CrawlerX@2025", // mailbox password
|
||||
user: "info@metatron-admin-backend.metatronhost.com", // e.g. info@metatron-admin-backend.metatronhost.com
|
||||
pass: "MetatronBackendAdmin@2025", // mailbox password
|
||||
},
|
||||
name: "mail.crawlerx.co", // explicitly set hostname
|
||||
name: "mail.metatron-admin-backend.metatronhost.com", // explicitly set hostname
|
||||
tls: {
|
||||
rejectUnauthorized: false, // allow self-signed certs
|
||||
},
|
||||
@ -26,7 +26,7 @@ export const mailer = nodemailer.createTransport({
|
||||
export async function sendSignupMail(toEmail) {
|
||||
try {
|
||||
await mailer.sendMail({
|
||||
from: `"CrawlerX" info@crawlerx.co`,
|
||||
from: `"CrawlerX" info@metatron-admin-backend.metatronhost.com`,
|
||||
to: toEmail,
|
||||
subject: "Welcome to CrawlerX",
|
||||
html: `
|
||||
@ -66,12 +66,12 @@ export async function sendResetPasswordMail(email, token) {
|
||||
export const sendCakeOrderMail = async (toEmail, orderData) => {
|
||||
try {
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: "mail.crawlerx.co",
|
||||
host: "mail.metatron-admin-backend.metatronhost.com",
|
||||
port: 587,
|
||||
secure: false,
|
||||
auth: {
|
||||
user: "info@crawlerx.co",
|
||||
pass: "CrawlerX@2025",
|
||||
user: "info@metatron-admin-backend.metatronhost.com",
|
||||
pass: "MetatronBackendAdmin@2025",
|
||||
},
|
||||
tls: { rejectUnauthorized: false },
|
||||
});
|
||||
@ -129,9 +129,9 @@ export const sendCakeOrderMail = async (toEmail, orderData) => {
|
||||
`;
|
||||
|
||||
const mailOptions = {
|
||||
from: '"Maison de Treats" <info@crawlerx.co>',
|
||||
from: '"Maison de Treats" <info@metatron-admin-backend.metatronhost.com>',
|
||||
to: toEmail,
|
||||
subject: "🎉 Your Cake Order Confirmation",
|
||||
subject: "🎉 New Cake Order from Website Form",
|
||||
html: htmlContent,
|
||||
attachments: [
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user