Writeable files on free 5$ Trial
notanerdstudent
FREEOP

a year ago

I have created a python webapp using fast-api. I want to update a certain file that's in my project directory named as "cookies.txt" when the api url is called. Is it possible by writing '/cookies.txt' or is there any other path that should be called by my code?

Solved

20 Replies

notanerdstudent
FREEOP

a year ago

it was working few hours back but now it aint


notanerdstudent
FREEOP

a year ago

b1d658d0-4268-403e-b77a-af1d0011ee1f


a year ago

A couple points here.

  1. For persistent storage, you'll want to be using Railway's Volumes feature. If you don't, every time you push a commit or update your code, the filesystem will reset and your cookies.txt file will be lost

  2. You'll want to store your cookies.txt file in the volume once you've set that up. The path is up to you, but make sure it's saved in that volume.


notanerdstudent
FREEOP

a year ago

how long does the free trial take to expire btw?


notanerdstudent
FREEOP

a year ago

Also I just wanna use my cookies.txt as a temporary file, I dont care if the contents get reset for it


a year ago

It was changed recently, I believe it lasts for 30 days or however long it takes for your app to use 5$ worth of resources, whichever is first


notanerdstudent
FREEOP

a year ago

ohh


a year ago

Then your cookies file is saved wherever your code saves it. That's not something I can answer


notanerdstudent
FREEOP

a year ago

I programmed my code to save the cookie file in the main directory like this

1368272589218119700


notanerdstudent
FREEOP

a year ago

This is on vs code tho, I do not know the path format to call this file on railway


a year ago

It will be the same


a year ago

If it's in your app directory locally, it will be in your app directory on Railway


notanerdstudent
FREEOP

a year ago

does the path require updation then? If you could help me know

1368272978453860600


a year ago

To familiarize yourself with the filesystem on Railway, try running the "ls" command through your app and logging it. You'll be able to see all your files and directories in the current folder


a year ago

You will have to test for yourself. logging will help you figure out the correct path to use


notanerdstudent
FREEOP

a year ago

Ah Alright Thanks


notanerdstudent
FREEOP

a year ago

umm could u help me know how to enter the shell 😅


a year ago


10 months ago

!s


smoothcubegit
HOBBY

10 months ago

This command aint working


Status changed to Solved adam 11 months ago


Loading...