Configuring handlebars

Inside Atom, let's get started by loading in handlebars const hbs = require hbs, as shown and from here we can add that one line:

const express = require('express');
const hbs = require('hbs');

Next, let's call app.set where we call app.use for Express static:

app.set
app.use(express.static(__dirname + '/public'));

This lets us set some various Express-related configurations. There's a lot of built-in ones. We'll be talking about more of them later. For now, about what we'll do is pass in a key-value pair, where the key is the thing you want to set and the value is the value you want to use. In this case, the key we're setting is view engine. This will tell Express what view engine we'd like to use and we'll pass in inside of quotes hbs:

app.set('view engine', 'hbs');
app.use(express.static(__dirname + '/public'));

This is all we need to do to get started.