AltCamp / altcampv1-backend

AltCamp is an e-learning platform that allows students to post messages to the discussion threads, interact and receive feedback from other students and instructors, and hence create a deeper understanding of the subject matter being discussed.
https://altcamp.onrender.com
MIT License
13 stars 17 forks source link

Cannot read properties of undefined (reading 'host') #236

Closed Olatisunkanmi closed 1 year ago

Olatisunkanmi commented 1 year ago

Contact Details

igbasanolasunkanmi080@gmail.com

What happened?

uncaught error as soon the server starts

see error log below: AltCamp-v1-backend/src/mailer/mailerService.js:8 host: smtpConfig.host, ^ TypeError: Cannot read properties of undefined (reading 'host')

Expected behavior

Server should start provided all required env keys are provided

Your Environment

Fedora 38

Steps to Reproduce the Behavior

Try cloing the repo afresh

Relevant log output

No response

Additional Context

No response

Code of Conduct

tobisupreme commented 1 year ago

Hi @Olatisunkanmi!

AltCamp-v1-backend/src/mailer/mailerService.js:8
host: smtpConfig.host,
^

The error log indicates that the configuration for the smtp is missing. Please refer to the example.env for the variables needed to run the local development server.

These are required for the mail service to function: variables for smtp configuration

Gmail provides smtp credentials that you can use in your local environment. You can also checkout services like Zohomail!

Perhaps we can extend the readmes with this information?