Some examples of how to use google sheets as a backend for lazy devs

Some examples of how to use google sheets as a backend for lazy devs #

1. Google sheets as a backend for a like button #

1.1. The idea #

The idea is to have a google sheet with a list of posts and a column with a number of likes. When a user clicks on a like button, the number of likes in the google sheet is increased by one. The number of likes is then displayed on the page.


0

1.2. The code #

The code is pretty simple. We have a function that is called when the user clicks on the like button. The function gets the number of likes from the google sheet, increases it by one and then updates the number of likes on the page.

here is a link to the google sheet

← Home