Live-server
https://www.npmjs.com/package/live-server
Live-server is a small development server with live reload capability. Use it for "hacking" your HTML/JavaScript/CSS files, but do not to deploy the final site.
There are two reasons for using this:
AJAX requests don't work with theย file://
ย protocol due to security restrictions, i.e. you need a server if your site fetches content through JavaScript. Having the page reload automatically after changes to files can accelerate development.
How To
Create a directory ./www
mkdir ./wwww
Edit a simple HTML page such as index.html in the ./www directory
<html>
<header></header>
<body>
<h1>This is a simple test</h1>
</body>
</html>
Run the command live-server to expose the directory
live-server ./www
Top comments (3)
Good post!
Clean and fast!
Thanks! Really cool tool! :)