Server responds in development but not in production
Answered
Silver Fox posted this in #help-forum
Silver FoxOP
title.
24 Replies
Silver FoxOP
basically the server is not working
im getting errors status 500
something should show up in the log
go to deployment => log
Silver FoxOP
ok
fix it
most likely an env var issue
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?
the problem is that fs doesn't work on vercel because vercel is serverless
since it's json already i'd just import it
Silver FoxOP
I need to write too
import data from "./path/to/data.json"
write then use a database or vercel kv
Answer
Silver FoxOP
any other hosting which work with fs?
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
Silver FoxOP
:((
Ill have to rewrite my backend
Silver FoxOP
time to setup firebase