Lightweight development-only Node.js server for SPAs, wrapping BrowserSync with automatic HTML5 history API fallback, live reload, and CSS injection via WebSocket. Version 2.6.1 (latest) as of 2023, maintained infrequently (last release 2021). Key differentiator: integrates BrowserSync with connect-history-api-fallback middleware out of the box, solving deep-linking for Angular/React/Vue SPAs with minimal config. Unlike plain BrowserSync, it defaults to serving index.html for unknown routes. Primarily used via npm scripts or npx, supports custom BrowserSync config via bs-config.json/js.
npm install lite-serverVerified import paths — ran on the pinned version, not inferred.
Basic setup: add lite-server to package.json scripts as 'dev', install locally, then run with npm run dev.
Use a proper production server like Express, Nginx, or serve-static.
Use module.exports = { ... } in bs-config.js.Monitor dependencies manually or use Dependabot/Renovate.
Run from project root or use --baseDir='dist'
Use absolute or correct relative path.
Consider alternatives like Vite, webpack-dev-server, or @angular-devkit/build-angular if issues arise.
Ensure lite-server is installed correctly; try 'npm install lite-server --save-dev'.
Check bs-config.js has module.exports = { ... }; for JSON file, ensure valid JSON.Specify a different port in bs-config.json: { "port": 8080 }Set correct baseDir in config or use --baseDir pointing to folder with index.html.
Reinstall lite-server: npm install lite-server --save-dev