How Should I Do File Writing/Reading When Deploying to Render/Railway?

I wrote a little Node JS app for my workplace- something to help me and my coworkers with a regular task. It works great when I run the server locally. But I want it accessible on everyone’s machine.

I was looking into web app hosting and found it’s a very complex topic. Tons of different services with configuration procedures explained in terms I have never come across before.

I was attracted to Railway and Render- both services with free tiers that say you can just hand them a Github repo and deploy your app. My experience hasn’t been so seamless. When either service starts to run my app, execution fails when it tries to do any file writing or reading.

I’m using the fs module to write and read files on my local server. I’m trying to understand what I need to change in my code to get the same effect on these services.

Without seeing the code or knowing more about the app I don’t think we can say much. If you post a repo with your code it might help.

I think both have disks/volumes that must be added to the project for persistent storage.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.