mirror of
https://github.com/Litlyx/litlyx
synced 2026-02-04 14:42:19 +01:00
fix email env
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import mongoose from "mongoose";
|
||||
import { Redis } from "~/server/services/CacheService";
|
||||
import EmailService from '@services/EmailService';
|
||||
|
||||
const config = useRuntimeConfig();
|
||||
let connection: mongoose.Mongoose;
|
||||
|
||||
@@ -7,8 +9,16 @@ export default async () => {
|
||||
|
||||
console.log('[SERVER] Initializing');
|
||||
|
||||
EmailService.createTransport(
|
||||
config.EMAIL_SERVICE,
|
||||
config.EMAIL_HOST,
|
||||
config.EMAIL_USER,
|
||||
config.EMAIL_PASS,
|
||||
);
|
||||
|
||||
|
||||
if (!connection || connection.connection.readyState == mongoose.ConnectionStates.disconnected) {
|
||||
console.log('[DATABASE] Connecting');
|
||||
console.log('[DATABASE] Connecting');
|
||||
connection = await mongoose.connect(config.MONGO_CONNECTION_STRING);
|
||||
console.log('[DATABASE] Connected');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user