DEV Community


Posted on

Handling subdomains with js frameworks

Is it possible to handle subdomains with frameworks?

Here I'm talking about nuxtJS specifically,
I'm having a site, let's say which shares the layout and few components with subdomain, now i want to create common nuxtJS project for this so that the layouts and other things can be shared between them. I already tried to implement it but I'm not getting the expected result...
Let's say I'm having folder structure like:

Pages / main-domain 
Enter fullscreen mode Exit fullscreen mode

As we can get subdomain part from window.location,so modifying default routes i can serve the files based on the url, and even my DNS is also configured for wildcard card locations so i can go to * and it'll show me my site but now problem is that I don't know how can i travel between different subdomains.

Discussion (0)