I am a CSE student at GUC and a software developer. Always looking forward to learn more!
- 🌱 I’m currently learning Web development and improving my problem solving skills.
- 📫 How to reach me: You can contact me on [email protected]
Simple eCommerce API built using NodeJS, Express and MongoDB.
I am a CSE student at GUC and a software developer. Always looking forward to learn more!
utils/mailer.js
• Install nodemailer using npm and require it in mailer.js.
• Set up a transporter object with your email service, username, and password.
• Create a sendEmail function that uses the nodemailer transporter to send an email. This function should take in the recipient's email address, the email subject, and the email text as parameters.
routes/auth.route.js
• Find the forgot-password and signup features in the code.
• Modify these features to use the sendEmail function from mailer.js. Pass in the appropriate parameters for each feature.
routes/order.route.js
• Find the order confirmation feature in the code.
• Modify this feature to use the sendEmail function from mailer.js. Pass in the appropriate parameters for this feature.
tests/auth/auth.api.test.js
• Add tests to verify that the forgot-password and signup features are sending emails correctly. This can be done by creating test accounts and checking the inbox of the email address used.
tests/order/order.api.test.js
• Add tests to verify that the order confirmation feature is sending emails correctly. This can be done by creating test accounts and checking the inbox of the email address used.
Implement nodemailer in mailer.js files in utils folder, export and import it to index.js and import it from there if needed.
Make sure you look up for controller.js and use it the same as I use it.
Add the needed routes to auth and modify the needed files in register and create order.
If you want to modify anything regarding logic, do it in services file.
Write new and modify needed old tests to check if send mail has been called.
P.S: before you do anything, delete all branches that have the name sweep and then continue what you are doing.
utils/mailer.js
• Implement nodemailer functionality in the
mailer.js
file. Export the necessary functions.
utils/index.js
• Import the nodemailer functions from
mailer.js
and export them.
routes/auth.route.js
• Modify the necessary routes to incorporate the nodemailer functionality. Use the nodemailer functions to send emails for forgot password and confirm signup.
services/auth/auth.service.js
• Modify the necessary functions to handle the logic for sending emails using nodemailer.
tests/auth/auth.api.test.js
• Write new tests and modify existing tests to check if the
sendMail
function has been called correctly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.