Can I run my website and the API on different doma...
# support-questions-legacy
c
Can I run my website and the API on different domains? In my case, the website hosted on a web hosting and the API hosted on a VPS. I'm struggling with communication between them. On localhost it works.
r
yea you can. Just set the right values for apiDOmain and websiteDomain on the frontend and backend.
c
Do I understand it correctly, that if the apiDomain value is set to localhost:3001, it means that the API is hosted on port 3001?
r
yes
c
and the IP is the IP of my VPS?
r
im not sure what IP you are referring to
please search the docs for "about appInfo"
and read more about the appInfo configs in there
hopefully that makes it clear
c
Hmm, okay, one more question before I do it.
I'm hosting the Supertokens Core on the same VPS (as the backend API). Is that OK?
r
Yes. That’s ok
c
(obviously, I want to run them on different ports)
Thanks
I've read it, but it's still not that clear. Let's say, that my website is https://example.com and the signup button moves user to https://example.com/auth. My website is hosted on a hosting and the backend API on my VPS. So I assume that: websiteDomain: "https://example.com" apiDomain: XXX.XXX.XXX.XXX:3001 (the address before the colon is my VPS's IP address) Is this correct?
r
Yes
c
alright, so I think that I'm having problems with Vite
do you have any tutorial on how to serve it on a cPanel based web hosting?
r
I think there is a YouTube video about it. Search for supertokens cPanel
But I’m not sure. It’s not something I can help much with. Sorry
If you have any specific question about supertokens, please lmk 🙂
c
Sure, thanks for your time and help
I appreciate it
4 Views