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