Five Server is a modern development server with live reload capabilities, designed as a maintained fork of the popular `live-server` package. It is completely rewritten in TypeScript and aims to provide up-to-date dependencies and enhanced features compared to its predecessor. Currently at version 0.4.5, it offers features like remote logs for debugging on mobile devices, built-in PHP server support, and compatibility with Server Side Rendered applications (e.g., Express.js). While it ships with a CLI, it also offers a programmatic API for integration into projects. Key differentiators include its robust module import options for various JavaScript environments and features specifically for its VSCode extension, and it targets Node.js version 16 or higher.
npm install five-serverVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically start Five Server, serving a specific directory on a custom port with live reload, without automatically opening a browser. Includes setup for a test 'public' folder.
Uninstall `live-server` globally and install `five-server`. Review the new API for programmatic usage and configuration options.
Install the Five Server VSCode Extension (`yandeu.five-server`) to utilize these editor-integrated functionalities.
Upgrade your Node.js environment to version 16 or newer using a version manager like `nvm` or `fnm`.
For Node.js ESM, use `import FiveServer from 'five-server/esm.mjs'`. For CommonJS, use `const FiveServer = require('five-server').default`.Correct the import to `const FiveServer = require('five-server').default;`Use the explicit ESM path: `import FiveServer from 'five-server/esm.mjs';` or fall back to: `import pkg from 'five-server'; const { default: FiveServer } = pkg;`Change the port number in your configuration (e.g., `five-server --port 8081` in CLI, or `{ port: 8081 }` in your programmatic options) or identify and terminate the conflicting process.No dependency data recorded yet.