Subdomain for the API

Hey, I want to use Nuxt for a project. For the Frontend itself I only need Endpoints from the server folder. However I would like to have a dedicated subdomain only for the api. so when I do https://api.somedomain.com/api/v1/hello the request will go to nitro instead of to the frontend. Is that somehow possible?
somedomain.com
This domain may be for sale!
3 Replies
Just Simeon
Just Simeon4mo ago
would I just redirect api.somedomain.com to /api?
manniL
manniL4mo ago
yeah, I'd just proxy like that IMO
Just Simeon
Just Simeon4mo ago
sounds good thanks
Want results from more Discord servers?
Add your server