Latest Posts

Node js and a janky webserver

2023-12-29


I have managed to secure a webserver for the node js backend! Turns out Render.com has a free tier that's perfect for what I'm trying to do. Now there is a small issue that being there is an idle time out and the 'disk' is non persistant. So after 15 minutes without any api calls the box spools down and then the counter reverts to the original state upon next start up. This kind of sucks but lukily the solution is relativly straight forwards. I have a small node js app running on a one of my local systems that just pings the server every 12-14 minutes. This keeps the webserver from turning off and keeps the counter up to date. Now I just need some way to back up the data localy so if my account ever gets terminated or something happens I don't lose track of the visitor count. That's a problem for another day though. For now I'm happy with the results, and I didn't have to spend a dime! Now is this solution increadibly scuffed? 100% however I have never worked with any sort of website networking like this so I'm kind of fumbling around in the dark. To be honest the fact that it works at all is kind of a miracle so I'm tempted to just leave it alone and not touch it. As far as I'm concered it's basically magic!