August 2016
Intermediate to advanced
376 pages
6h 33m
English
The first step to do is to change the default express template engine to use Swig, a pretty simple template engine very flexible and stable, also offers us a syntax very similar to AngularJS which denotes expressions just by using double curly brackets {{ variableName }}.
More information about Swig can be found on the official website at: https://github.com/paularmstrong/swig.
package.json file and replace the jade line with the following:
"swig": "^1.4.2",
npm install
app.js, we need to add the Swig module. Open app.js and add the following code, right after the var bodyParser = require('body-parser'); ...Read now
Unlock full access