1.0.2 • Published 5 years ago
html-countdown-server v1.0.2
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 :
HHHH:MMHH: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 :
- http://localhost:8080/?time=12
- http://localhost:8080/?time=12:13
- http://localhost:8080/?time=12:13:14
- http://localhost:8080/?time=12:13:14&textColor=#FFF&backgroundColor=#000
- http://localhost:8080/?time=12:13:14&textColor=white&backgroundColor=black&fontFamily=Roboto&fontWeight=400&fontSize=50px&endText=The end
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 release1.0.1(2020-09-01)- Change default
backgroundColorto#00000000 - Fix potential path issue
- Change default
1.0.2(2020-09-02) • Fix number10being transformed to010