http://localhost:3000/api vs /api
Answered
NuclearMonkey posted this in #help-forum
when do I use one over the other?
9 Replies
just use /api
Answer
first one will fetch only the localhost
the /api will fetch the api route regardless of the environment
why do some people use the localhost one?
hmm, honestly no one does? they do when they are running backend on seperate server using node or smthing.
not while using next.js
ohh, okay. thanks for the clarification
sure, if your problem is solved, consider marking answer as solution.
Original message was deleted