https://langhamerm.github.io/NodeMailDemo/
NodeMailer Doc: https://nodemailer.com/about/
-
Create a Github Repo
-
npm init
- entry point: app.js
- author: Your Name
-
Install Dependencies
- express
- body-parser
- express-handlebars
- nodemailer
- npm install express body-parser express-handlebars nodemailer
-
Create app.js file
-
npm install -g nodemon
-
Require each of your dependencies in app.js
- EX: const express = require('express');
-
Initialize app variables
- const app = express();
- GET route for the landing page or '/'
-
In your terminal run:
- node app.js
-
Setup View Engine
- app.engine('handlebars', exphbs());
- app.set('view engine', 'handlebars');
-
Body Parser MiddleWare
-
Setup Public Folder