finds.dev← search

// the find

johnpapa/lite-server

★ 2,308 · JavaScript · MIT · updated Jun 2026

Lightweight node server

lite-server is a thin wrapper around BrowserSync that adds HTML5 history API fallback, making it trivially easy to serve SPAs locally without configuring nginx or a framework-specific dev server. It's aimed at developers who want a zero-configuration local dev server for vanilla JS or framework-agnostic projects. In 2026 this is a solved problem in most modern toolchains.

BrowserSync underneath means you get CSS injection over sockets, multi-device sync, and a UI dashboard without writing any config. The SPA fallback (connect-history-api-fallback) is the one thing that trips up bare static servers, and lite-server wires it in by default. The middleware override system is honest about its own internals — you can null out defaults or replace them by array index, which is a better design than hiding them. npx usage means zero install for quick throwaway projects.

This is essentially a thin BrowserSync config file dressed up as a package — there's very little actual code here (index.js is ~60 lines), and BrowserSync itself has been in maintenance mode for years. Any modern framework (Vite, Astro, Next, even plain Parcel) ships a dev server that does all of this better, faster, and with HMR instead of full-page refresh. The CSS injection workaround for Angular 2 is still listed as a known issue in the README in 2026, which tells you how actively this is maintained. If you're reaching for this in a new project, ask yourself why your build tool doesn't already have a dev server.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →