Yes, unfortunately, since the count is kept in memory, the count will reset if the server crashes.
I've created an updated post where I'm using an extra layer of persistence to power the app. You can apply that technique to this example by supplying sqlite or other database instead of using an in memory count.
Great article, Ryan! In order to keep everything simple and donβt use DB I just save the counter value in the .txt file and it looks like itβs working fine on Glitch.
github.com/iamskok/github-readme-c...
This is an excellent way to handle persisting the count :D
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes, unfortunately, since the count is kept in memory, the count will reset if the server crashes.
I've created an updated post where I'm using an extra layer of persistence to power the app. You can apply that technique to this example by supplying sqlite or other database instead of using an in memory count.
Great article, Ryan! In order to keep everything simple and donβt use DB I just save the counter value in the .txt file and it looks like itβs working fine on Glitch.
github.com/iamskok/github-readme-c...
This is an excellent way to handle persisting the count :D