You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a duplicated configuration of the nodemailer transporter in the code. This can lead to unnecessary redundancy and potential misconfiguration.
The dotenv.config() is placed after other module imports, which can result in missing environment variables.
Steps to Reproduce
Run the server.
Check the code and see the duplicate nodemailer transporter setup.
Notice the placement of dotenv.config() after the module imports.
Expected Behaviour
The nodemailer transporter should be configured once, and dotenv.config() should be placed at the top of the file to ensure all environment variables are loaded before other modules are imported.
Potential Fix
Move dotenv.config() to the top of the file.
Remove the duplicate nodemailer transporter configuration from the contactus route.
Record
I agree to follow this project's Code of Conduct
I'm a GSSOC'24 contributor
I want to work on this issue
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
What happened?
Description
dotenv.config()
is placed after other module imports, which can result in missing environment variables.Steps to Reproduce
dotenv.config()
after the module imports.Expected Behaviour
The nodemailer transporter should be configured once, and
dotenv.config()
should be placed at the top of the file to ensure all environment variables are loaded before other modules are imported.Potential Fix
dotenv.config()
to the top of the file.contactus
route.Record
The text was updated successfully, but these errors were encountered: