Lightweight static server demo with _headers and _redirects support, gzip and brotli compression.
Important
This server is intended for testing general static web hosting and is not recommended for production use.
This package is published to GitHub Packages.
- Authenticate npm with GitHub Packages (once per machine):
npm login --scope=@cizzuk --registry=https://npm.pkg.github.com
You will need a GitHub account's Personal access tokens for authentication.
- Install globally:
npm i -g @cizzuk/pichost
pichost --dir _site --port 8080
Default directory is _site
and default port is 8080
.
Add pichost.config.json
in your project root:
{
"port": 8080,
"dir": "_site"
}
CLI flags override config file values.