The rebuilding process is divided into two parts: the first to have a solid base structure of directories and the second to add some more folders and files with the purpose of making our application as modular and scalable as possible.
To start with, we will create a new folder called conference-api
. Going forward, we will refer to this folder only as the root folder. So, you already know that we are referring to the application root directory. The first thing to do is start the Express scaffold generator; to do this open the terminal on the root folder and type:
express --ejs
The ejs
option stands for Embedded JavaScript (EJS), and with this command, we change the standard library Jade
to ejs
for the views' templates.
Tip
You can read more about Embedded JavaScript at http://www.embeddedjs.com/.
At this stage, you must have the following default scaffold, as shown in the following screenshot: