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 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.