Server responds in development but not in production
Answered
Silver Fox posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Silver FoxOP
title.
24 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Silver FoxOP
![Image](https://cdn.discordapp.com/attachments/1151080393815113728/1151080510710358036/image.png)
![Image](https://cdn.discordapp.com/attachments/1151080393815113728/1151080559683043358/image.png)
basically the server is not working
im getting errors status 500
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/f386ac21405ce3442e0f3598223e1cb3.webp?size=256)
joulev
something should show up in the log
go to deployment => log
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Silver FoxOP
ok
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/f386ac21405ce3442e0f3598223e1cb3.webp?size=256)
joulev
fix it
most likely an env var issue
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Silver FoxOP
- error [Error: ENOENT: no such file or directory, open 'app/api/storage/servers.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'app/api/storage/servers.json'
}
I need to redo the paths?
what should I keep the paths as?
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/f386ac21405ce3442e0f3598223e1cb3.webp?size=256)
joulev
the problem is that fs doesn't work on vercel because vercel is serverless
since it's json already i'd just import it
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Silver FoxOP
I need to write too
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/f386ac21405ce3442e0f3598223e1cb3.webp?size=256)
joulev
import data from "./path/to/data.json"
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/f386ac21405ce3442e0f3598223e1cb3.webp?size=256)
joulev
write then use a database or vercel kv
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Silver FoxOP
any other hosting which work with fs?
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/f386ac21405ce3442e0f3598223e1cb3.webp?size=256)
joulev
any server-ful hosting will work with fs
your private server, digital ocean, render, fly.io, railway, etc
but they are not free
conventional hosting is always more expensive than serverless
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Silver FoxOP
:((
Ill have to rewrite my backend
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Silver FoxOP
time to setup firebase