how to reference volume in code.

2 years ago

I have code that writes when POST an excel file in the project directory for future referencing... i know databases exists but that's how the client wanted it lol the issue is of course since the service the files are ephiemeral on a redeploy they disappeared i attached a volume but tbh i have no idea on how to write to it

like i'm actually using

const excelDirPath = join(process.cwd(), 'excel');

const excelFilePath = join(excelDirPath, 'calc.xlsx');

and i mounted /excel in the volume does that automagically works or i have to adjust it?

Closed

7 Replies

2 years ago

N/A


2 years ago

if you mount a volume to /excel you write into /excel

no need to overthink it


2 years ago

join(process.cwd(), 'excel');

this results in something like /app/excel aka the wrong directory


2 years ago

ok daddy thank you


2 years ago

bruh


2 years ago

<:sus_apple:1032821016319234068>


maddsua
HOBBY

2 years ago

🤨


Welcome!

Sign in to your Railway account to join the conversation.

Loading...