๐Ÿš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more โ†’
Socket
Sign inDemoInstall
Socket

ht-serve

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ht-serve

A secure HTTPS live reload server for front-end prototyping and dashboard development

0.0.3
Source
PyPI
Maintainers
1

HT-Serve

License: MIT

HT-Serve is a secure HTTPS file server with live reload support, built for UI/dashboard prototyping. It enables frontend developers to test real-time changes under TLS with zero configuration, WebSocket-triggered reloads, and a CLI interface for orchestration.

๐Ÿ”ง Features

  • ๐Ÿ”’ Auto HTTPS via self-signed certificates (or use custom certs)
  • ๐Ÿ” WebSocket-based live reload on file changes
  • ๐Ÿงฉ Automatic HTML injection of live-reload script
  • ๐Ÿงช Built-in test UI (ht-serve reset-demo)
  • ๐Ÿ” Health check endpoint at /healthz
  • ๐Ÿง  CLI interface with serve, check, and reset-demo
  • ๐Ÿงพ Production-grade logging and debug mode (HT_DEBUG=1)

๐Ÿ“ฆ Installation

pip install .

๐Ÿš€ Usage

Launch the development server:

ht-serve serve --open-browser

Check if HTTPS/WebSocket ports are available:

ht-serve check

Reset and regenerate a demo UI site:

ht-serve reset-demo

โš™๏ธ Environment Variables

VariableDescription
DASH_CERT_PATHFull path to the HTTPS certificate (.pem)
DASH_KEY_PATHFull path to the HTTPS private key (.key)
DASH_PORTPort to serve HTTPS on (default: 443; fallback: 8443)
HT_DEBUGSet to 1 to enable verbose logging and file event tracking
HT_FORCE_CERTSet to 1 to regenerate the TLS cert/key on next launch

๐Ÿ“ Directory Structure

HT-Serve/
โ”œโ”€โ”€ ht_serve/
โ”‚   โ”œโ”€โ”€ cli.py               # Typer-based CLI commands
โ”‚   โ”œโ”€โ”€ server.py            # Core HTTPS + WebSocket server logic
โ”‚   โ”œโ”€โ”€ templates/
โ”‚   โ”‚   โ””โ”€โ”€ inject.js        # Injected live-reload script
โ”‚   โ””โ”€โ”€ testsite/            # Sample demo UI assets
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ setup.py
โ””โ”€โ”€ README.md

๐Ÿชช License

MIT ยฉ HermiTech Labs

Keywords

https

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts