Squirrelly with ExpressJS

Since Squirrelly exports the __express helper, it works out-of-the-box with Express.

Though Squirrelly handles caching, it isn't very sophisticated and the cache only lives for the life of the program (it's stored in a variable). You may want to implement your own caching solution.

let express = require('express');
let path = require('path');
let app = express();
app.set('view engine', 'squirrelly')
app.get('/', function (req, res) {
res.render('index', {
name: 'Title',
fav: 'Squirrelly'
let server = app.listen(4000, function () { // This starts the server
console.log("listening to request on port 4000");
<!DOCTYPE html>
<p>My favorite template engine is {{fav}}</p>