#Url to call api must be different iffit’s use client or server side component ? Idk quesion good ?t

1 messages · Page 1 of 1 (latest)

warm torrent
#

hello, I think I am missing something, when you use a next js app and use a different app for api to provide data, the url to make calls must be different if it's "use client" client component or server side like localhost if it's server component and domain.com/api for server components

quick bearBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

signal rootBOT
warm torrent
#

Url to call api must be different iffit’s use client or server side component ? Idk quesion good ?t

tawdry crater
#

yeah use cleint call from your browser and when you use the server componnet it call from nextjs local server!

warm torrent
#

So how do you handle the address of a api you need to change it if it’ called from client to the server url and if its called from server action it’s local ip like docker or localhost