DEV Community

Discussion on: Quick GitHub profile visit counter

Collapse
 
ryanlanciaux profile image
Ryan Lanciaux

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.

Collapse
 
iamskok profile image
Vladimir Skok • Edited

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...

Thread Thread
 
ryanlanciaux profile image
Ryan Lanciaux

This is an excellent way to handle persisting the count :D