How to run html file on localhost?

Volkan Şahin picture Volkan Şahin · Jul 21, 2016 · Viewed 128.3k times · Source

I have a html file and i run it on localhost. But, this file includes mirror using webcam. Example, how can i run this html file on localhost? Webcam starting on this example when check to live checkbox. Thanx for your reply.

Answer

Clinton Roy picture Clinton Roy · Jan 21, 2018

You can run your file in http-server.

1> Have Node.js installed in your system.

2> In CMD, run the command npm install http-server -g

3> Navigate to the specific path of your file folder in CMD and run the command http-server

4> Go to your browser and type localhost:8080. Your Application should run there.

Thanks:)