Probably most will be able to find a solution from the above answers but seeing as how none worked for me ( vscode v1.34) i thought i'd share my experience. Now before any coding session just type npm start and you are good to go!
Wait a second and index.html is loaded and displayed in your default browser served by your local web server! In the same terminal window (command prompt in Windows) run this command: npm start (Assuming you have an index.html file in your project folder).
#Html executable viewer install
This will install lite-server (defined in package.json), a static server that loads index.html in your default browser and auto refreshes it when application files change. In a terminal window (command prompt in Windows) opened on your project folder, run this command: npm install Add a package.json file to the project folder Somewhere in your drive, create a new folder for your web app.ģ. It comes with npm (the package manager for acquiring and managing your development libraries) Setup a local web server known as lite-server with VS Code, and also guides you to host your static html files in localhost and debug your Javascript code. I am just re-posting the steps I used from msdn blog. You can also run your task just by entering Ctrl+P and type task webserver
#Html executable viewer how to
Here is an information on how to configure 'gulp-webserver' for instance port, and what page to load. Now any changes that you will do to your HTML or CSS pages will be automatically reloaded.
Your webserver now will open your page in your default browser.
Remove everything from it end enter just following code If you would like to have live reload you can use gulp-webserver, which will watch for your file changes and reload page, this way you don't have to press F5 every time on your page:Įnter Ctrl+Shift+P in VS Code and type Configure Task Runner.