1.0.2 • Published 4 years ago

html-countdown-server v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

HTML countdown server

A simple HTML countdown generator as an HTTP server.

Getting started

Requirements

  • NodeJS

Installation

  • npm install html-countdown-server -g

Usage

HTTP server

  • html-countdown-server

Eventually followed by a port number (default is 8080), eg. : html-countdown-server 1234

HTTP client

Minimal URL :

  • http://localhost:PORT/?time=HH

The time parameter must follow one of the following formats :

  • HH
  • HH:MM
  • HH:MM:SS

An invalid or undefined time parameter will return a 400 (Bad Request) HTTP error.

Optional parameters :

ParameterDefault valueDescriptionType
textColor#4C5193Text colorCSS color (string)
backgroundColor#00000000Background colorCSS color (string)
fontFamilyPoppinsFont familyGoogle Fonts font (string)
fontWeight700Font weightPositive integer (usually light = 300, normal = 400, bold = 700, etc.)
fontSize77pxFont sizeCSS length
endTextLIVECountdown end textString

Examples :

Yes, CSS color values supports # wich are automatically replaced by %23 and string values supports spaces which are automatically replaced with %20.

Embedding compatibility

This tool has been successfully tested in <iframe>, in OBS Studio as browser source and should work in Streamlabs OBS and Electron.

Changelog

  • 1.0.0 (2020-08-31) • Initial release
  • 1.0.1 (2020-09-01)
    • Change default backgroundColor to #00000000
    • Fix potential path issue
  • 1.0.2 (2020-09-02) • Fix number 10 being transformed to 010