Settings

Theme

Show HN: Trivially Simple Value Toggle

swap.ist

2 points by _justinfunk 2 years ago · 1 comment · 1 min read

Reader

I needed access to a toggling value for an automation. I could have written a local file or use a local data store but I was inspired to make a simple web service instead.

swap.ist gives you URL key that whenever accessed will toggle between true or false.

The use-cases are... at least one, but probably more.

_justinfunkOP 2 years ago

For anyone who cares about the stack:

1) Node Express Server 2) Using Firebase RTDB to store swap state 3) CloudFlare Tunnel to a web-server I had laying around

index.js is 141 lines, including the HTML for the homepage.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection