hieuhani / nuxt-multi-tenancy

Nuxt Multi Tenancy Module - multi-tenancy by sub domain for Nuxt application
https://techgoda.net/
MIT License
181 stars 17 forks source link

Why are links in `jobs.localhost:3000/` pointing to the files in the home directory? #22

Closed cybercoder-naj closed 4 months ago

cybercoder-naj commented 4 months ago

When I am running the application locally, I visit jobs.localhost:3000/ and I can see that points to pages/jobs/index.vue which I think is expected. However, when visiting a link such as jobs.localhost:3000/some-slug, I see that this actually renders pages/[slug].vue. I don't think that should be the intended behaviour. Am I missing something?

In my opinion, jobs.localhost:3000/some-slug should render pages/jobs/[slug]/index.vue which I think is failing.

hieuhani commented 4 months ago

Please declare the root domain for localhost here https://github.com/hieuhani/nuxt-multi-tenancy/blob/main/playground/nuxt.config.ts#L13C5-L13C16 or you can map nuxtdev.local and jobs.nuxtdev.local to 127.0.0.1 in the etc/hosts file