Permitted to Run fs.renameSync() on Production Server Files?

My app is hosted on Galaxy. Is it permitted, to run fs.renameSync() on my production server, in order to update a .js file that is imported by the home page on my client?

And a follow-up question: if the answer is yes, what filepath would be accessible?

I guess I should add a bit of background on why I’m thinking of this. I’m trying to get my home page load to be as fast as possible. I’m guessing an import statement is faster than a database call that needs a call from client to server. So I’d have a cron job on the server, do the database call once a day and update a .js file on the server with the result. Please let me know if there are better approaches.

1 Like

You can use valkey/redis

1 Like