Servor is a compact, dependency-free development server designed for modern web application development, particularly single-page applications. Currently at version 4.0.2, it provides features like live reloading, HTTPS/HTTP2 support with self-signed certificates, gzip compression, and frontend routing redirection. It aims for minimal code and relies only on native Node.js and browser APIs, differentiating it from larger alternatives by its zero-dependency philosophy. Releases are generally stable, with major version updates introducing significant architectural changes, such as the shift to native ESM in v4.
npm install servorVerified import paths — ran on the pinned version, not inferred.
This command demonstrates how to clone a GitHub repository, start a Servor instance, open it in a browser and editor, and enable live reloading for development.
Update imports to use ESM syntax `import { Servor } from 'servor';` for ESM projects. For CJS projects, use dynamic imports like `const { Servor } = await import('servor');`.Ensure `openssl` is available in your system's PATH. For macOS, additional steps might be required (`sudo security add-trusted-cert`) to trust the generated root certificate in your browser.
Follow the instructions in the `servor` documentation to add `servor.crt` to your system's trusted certificate store. This typically involves `sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain servor.crt` on macOS or similar steps for Linux/Windows.
Change `const Servor = require('servor');` to `const { Servor } = await import('servor');` in your CJS code.Specify an alternative port, e.g., `npx servor . index.html 3000`, or find and terminate the process currently using the port.
Manually accept the security warning in your browser, or follow the `servor` documentation to add the generated `servor.crt` to your operating system's trusted certificate store.
No dependency data recorded yet.