How to do it...

First let's open a terminal and cd into the directory we created in the first recipe,

$ cd micro

Next we'll generate the application skeleton using the express command-line tool (which we installed with express-generator), and then use standard --fix to conform the code to our lint rules:

$ express --view=ejs ./webapp$ cd webapp$ standard --fix

This will create a skeletal web application using EJS templates in a new directory called webapp.

Embedded JavaScript (EJS) templates The ejs module provide EJS templating capabilities. To learn more about EJS and template engines see the Adding a View Layer recipe in Chapter 7, Working with Web Frameworks.

We'll also create a few files, and add an additional dependency:

$ touch routes/add.js ...

Get Node Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.