The http-server module is a command-line Node.js package for serving files from a local directory over HTTP. Install it globally with npm, navigate to a project folder, and run http-server to make HTML available in a browser. section 2.6
A minimal workflow is:
- Install Node.js, then install the module globally with npm. section 2.6
- Create a project directory and add a test.html file. section 2.6
- Run http-server from the project directory and open the reported localhost address, adding /test.html. section 2.6
Serving a component demo
A folder containing an HTML page can be served with http-server, letting the browser load a custom photo-carousel element and its assets through HTTP rather than directly from the filesystem. section 2.6
npm install http-server -g
View the installation command used to make http-server available globally. section 2.6

