R
Railway•3mo ago
Hys

how to reference volume in code.

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?
Solution:
if you mount a volume to /excel you write into /excel no need to overthink it...
Jump to solution
8 Replies
Percy
Percy•3mo ago
Project ID: N/A
Hys
HysOP•3mo ago
N/A
Solution
Brody
Brody•3mo ago
if you mount a volume to /excel you write into /excel no need to overthink it
Brody
Brody•3mo ago
join(process.cwd(), 'excel'); this results in something like /app/excel aka the wrong directory
Hys
HysOP•3mo ago
ok daddy thank you
Brody
Brody•3mo ago
bruh
Fragly
Fragly•3mo ago
:sus_apple:
maddsua
maddsua•3mo ago
🤨
Want results from more Discord servers?
Add your server