Project Gold Medal Metrics - Extremely Slow DB Startup (30 mins)

I am working on the below project. I have downloaded the solution code - when running node server.js, I immediately get the data loaded message as intended.

The problem comes when I open index.html, the data does not populate on the webpage. After much troubleshooting I found that if I wait (nearly 30 minutes) and refresh the webpage - it will populate as intended very quickly.

Watching the working directory in explorer window, I find that there is a file “gold_medals.sqlite-journal” which pops up to about 8kB at a time and seems to be slowly transferring into “gold_medals.sqlite”. I have to imagine it is a file used by sqlite3 to populate the database somehow. I notice that when that file finally goes away, the webpage begins to work.

Note that when I try to access the database while gold_medals.sqlite-journal is there, the DB is locked.

Any advice on how I might fix this so that I don’t have to wait a half hour after every time I start the server?