Server read data from public
Hello,
In server/api I have data script, that reads file from public, and returns json
When I build and run it locally, everything is fine; but when I try to deploy it with netlify I get empty response from api/data.
Most likely it is due to current working directory (
In server/api I have data script, that reads file from public, and returns json
When I build and run it locally, everything is fine; but when I try to deploy it with netlify I get empty response from api/data.
Most likely it is due to current working directory (
process.cwd()) being outside of dist folder, however I have no idea, how else I can load that data, as relative path to public differs between dev and build.