Installing frontend components with Bower

As we can see in the previous examples, we use a CDN to serve the CSS file and some JavaScript files for the example application. In this step, we will introduce a widely-used tool for dependencies management, known as Bower, for dealing with frontend frameworks such as the Twitter Bootstrap:

  1. Open your terminal/shell and type the following command:
    npm install bower -g
    

    The previous command installs Bower globally on your machine.

  2. Inside the root project folder, type the following command:
    bower install bootstrap#v4.0.0-alpha
    

The previous command will install Bootstrap inside the public/components folder, as we can see in the following image:

Screenshot of the components folder

Note that the previous command ...

Get Node.js 6.x Blueprints now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.