Static Server
- Learn more about Allure Report at https://allurereport.org
- Documentation – discover official documentation for Allure Report
- Questions and Support – get help from the team and community
- Official announcements – be in touch with the latest updates
- General Discussion – engage in casual conversations, share insights and ideas with the community
Overview
Minimalistic web-server for serving Allure Reports and static files with live reload support.
Install
Use your favorite package manager to install the package:
npm add @allurereport/static-server
yarn add @allurereport/static-server
pnpm add @allurereport/static-serverUsage
The server can be used programmatically only:
import { serve } from "@allurereport/static-server";
const server = await serve({
// by default uses a random available port
port: 8080,
// path to the directory with files should be served
servePath: "/path/to/your/static/files",
// enable live reload
live: true,
});
// reloads the served pages manually, even if live reload isn't enabled
await server.reload();
// stops the server
await server.stop();