Last Update October 31, 2020: We improved the overall article.

Today it’s really easy to setup Node.js and install npm apps on Windows systems. Here’s a guide how to setup a HTTP server.

  • First you must install NodeJS.
  • Open the Node.js command prompt to run following commands.
  • Run this command to install a HTTP server: npm install http-server -g
npm install http-server -g
npm install http-server windows screenshot

Install mongodb library for Node

npm install mongodb
  • And start the HTTP server: http-server /path/to/docroot with a path to the folder you want to share. Your folder must have some files before it works.
cd C:UsersusernameAppDataRoamingnpmnode_moduleshttp-server
http-server root acces/starting screenshot
C:UsersusernameAppDataRoamingnpmnode_moduleshttp-server start
  • Now just open http://localhost:8080/ in your browser.
Previous articleHow to run AngularJS Project
Next articleNokia X Developer Tools Installing and configuring
Abdullah Al Mahamud has always been fascinated by the world and is a writer because he wants to share her love of travel with others. He has written for thedevline since 2016, specializing in modern real-life writing about fashion, arts & culture, technology tips, and more! When not writing articles for us at The dev line (which doesn't happen often!), he enjoys exploring both scenic beauty around the globe as well as intellectual topics that help other people become happier. like productivity hacks or ways to save on your grocery bill.