Express js Scaffolding
Scaffolding is used to create a skeleton structure for our application. This is supported by many MVC frameworks. This reduces lots of development cost, as it has predefined templates that we can use for CRUD operations.
There are many express.js scaffolding available, here we are using 'express-scaffold'. This is a simple mvc scaffolding of express. To install this, create a directory and run the following command from that directory.
$ npm install express-scaffold
This package contains an express command line tool, run the following command to install express-generator package.
$ npm install express-generator -g
This is the lists of express generator command options. Suppose we want to use a pug view engine to create new applications.
Then, also commands these following-
>cd newapp >npm install >SET DEBUG=newapp:* & npm start
Open the browser at the following url 'http://localhost:3000/', we will get this -