html-countdown-server

1.0.2 • Public • Published

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 :

Parameter Default value Description Type
textColor #4C5193 Text color CSS color (string)
backgroundColor #00000000 Background color CSS color (string)
fontFamily Poppins Font family Google Fonts font (string)
fontWeight 700 Font weight Positive integer (usually light = 300, normal = 400, bold = 700, etc.)
fontSize 77px Font size CSS length
endText LIVE Countdown end text String

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

Dependents (0)

Package Sidebar

Install

npm i html-countdown-server

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

6.78 kB

Total Files

5

Last publish

Collaborators

  • kaki87