talira

Live Server

A local development server with live reload, started from VS Code

open sourceMITfree

Live Server is a Visual Studio Code extension (ritwickdey.LiveServer) by Ritwick Dey that starts a local development server for static pages with one click on Go Live in the status bar, and reloads the browser whenever you save a file. It has a configurable port, server root and browser, HTTPS, a proxy, CORS (off by default), file exclusions for change detection, connections from other devices on your network and multi-root workspaces. Server-side pages such as PHP need its companion browser extension, Live Server Web Extension. It's published on the VS Code Marketplace and Open VSX.

Problems it solves

  • refresh the browser automatically when I save an HTML or CSS file
  • serve a static site locally while I edit it in VS Code
  • preview my web page on my phone while developing

Features

  • one-click local server from the status bar
  • browser reload on save
  • custom port, root and browser
  • HTTPS and proxy support
  • open the page from another device on the network

Limitations

  • Doesn't reload server-side pages such as PHP by itself: that needs its separate browser extension1

Alternatives

The same job

These do what Live Server does.

  1. Live Preview Microsoft's VS Code extension that serves your workspace locally and previews web pages in the editor
  2. Browsersync Live reload and synchronised browser testing across devices
  3. Five Server A development server with live reload, PHP serving and browser logs in your terminal, with a VS Code extension

Compare Live Server with the top 3