Running a quick node.js file server

If you don’t want to take the extra trouble of installing node-static module and writing multiple lines of code to create a server to serve the files from your folder, a “ready to use tool”  called http-server will be the solution.

http-server is a simple, zero-configuration command-line http server

All you need is have npm and node installed in your system.

Installation via npm:

npm install http-server -g

Usage:

http-server [path] [options]


example: http-server D:\myfolder –o

This will open browser window after starting the server.

 

For more http-server options, see the documentation.