summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorDarius Kazemi <darius.kazemi@gmail.com>2020-01-04 13:33:35 -0800
committerDarius Kazemi <darius.kazemi@gmail.com>2020-01-04 14:15:27 -0800
commit8587b5b41e5781ea6fe4ce130e36ac327548864b (patch)
tree9017a4b0809a4bec359dbaa4a3bbf4c9a44dc761 /app.js
parent49817373b16a7b4c36d32a9d23563c95c40ca685 (diff)
Email refactoring
Tons of refactoring of email. This no longer uses Sendgrid templates and now uses source-controlled handlebars files in the `views/emails/` directory. This means that email messages are now source-controlled and vastly reduces the sendgrid setup process.
Diffstat (limited to 'app.js')
-rwxr-xr-xapp.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app.js b/app.js
index ab4eb56..c6e0647 100755
--- a/app.js
+++ b/app.js
@@ -19,6 +19,7 @@ const app = express();
hbsInstance = hbs.create({
defaultLayout: 'main',
partialsDir: ['views/partials/'],
+ layoutsDir: 'views/layouts/',
helpers: {
plural: function(number, text) {
var singular = number === 1;
@@ -39,6 +40,7 @@ hbsInstance = hbs.create({
});
app.engine('handlebars', hbsInstance.engine);
app.set('view engine', 'handlebars');
+app.set('hbsInstance', hbsInstance);
// Static files //