You can expand the functionality of the prev app if you add a hardware button control. Pressing the button will also toggle the state of the GPIO line (LED, relay,...) which is reflected in the LED state displayed in the browser window.
GitHub Repository
Name: tps-gpio-tutorials
Repository page: https://github.com/tibbotech/tps-gpio-tutorials
Clone URL: https://github.com/tibbotech/tps-gpio-tutorials.git
Updated At: Mon Oct 10 2016