Skip to content

FilipChalupa/Just-Countdown

Repository files navigation

Just Countdown

Countdown timer with remote control.

screenshot

demo.mp4

API

GET https://just-countdown.eu/api/control?id=my-countdown

Replace my-countdown with your own countdown ID.

Response is described by type Data in pages/api/control.ts.

Optional parameters

Add any of them to the URL above.

  • start (start countdown)
  • pause (pause countdown)
  • togglePaused (toggle paused state)
  • showHours (show hours)
  • hideHours (hide hours)
  • toggleHours (toggle hours visibility)
  • set=60 (set countdown to 60 seconds)
  • adjust=10 (add 10 more seconds to countdown)

Example

  1. GET https://just-countdown.eu/api/control?id=my-countdown&set=300&hideHours&start
    

    Sets countdown to 5 minutes, hides hours and starts countdown.

  2. GET https://just-countdown.eu/api/control?id=my-countdown&adjust=-30
    

    Subtracts 30 seconds from countdown.

Note

  • Server may be off by few seconds.

Development

npm ci
npm run dev