With increase in nodejs popularity, npm is becoming a go to tool for package distribution, and I think every developer must have nodejs installed in there system. So go ahead, download nodejs from here https://nodejs.org/en/ and install it.
Once nodejs is installed, go to command prompt and execute
node -v or npm -v
You should see the version number of nodejs. This confirms nodejs is installed in your system properly. Open the command prompt (Note- these instructions works on mac system too.), execute following command
npm install -g static-server
Above code fetches latest version of "static-server" package and installs globally in your system. With this installtion you are ready to server any folder as a web server.
Create "workspace" folder in one of your drive and create a folder called "myApp". Navigate to myApp folder and create an index.html and paste this below code into index.html .
Execute the command "static-server" from myApp folder, you should see following out put in command prompt.
Head over to your chrome browser and open url http://localhost:9080 You should see the following screen.
Congratulations, you have created a web server and serving your content from that server. Don't worry if you dont understand the code in index.html, it is a simple html code added with Material design lite components to give more aesthetic appeal. We will be covering material design lite in up coming blog. I will also cover debugging and developing front end with "chrome developer tool" in upcoming blog.
Go ahead and explore the app!!.