Reputation: 49
I do know how to use localStoarge and sessionStorage, but is there anyway to store a variable online (github), (for example a button, and how many times it is pressed, but people can see how many times it is pressed from multiple locations), I am aware of databases, but I only really need to store one variable.
Upvotes: 2
Views: 1055
Reputation: 3818
As @Brian mentioned, you can use the GitHub API.
You can have a file to store your variable on GitHub then update it using:
PUT /repos/:owner/:repo/contents/:path
Here is a link to the section of the GitHub API.
Upvotes: 1
Reputation: 135
In order to store something which allow users to see and update you need a server. So, if you find database extra, you may use a text document in your server and access it wherever you need to update the value or just read it.
Upvotes: 2