Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom hostname as local address #371

Open
2 of 4 tasks
hugobqd opened this issue Mar 19, 2024 · 3 comments
Open
2 of 4 tasks

Custom hostname as local address #371

hugobqd opened this issue Mar 19, 2024 · 3 comments

Comments

@hugobqd
Copy link

hugobqd commented Mar 19, 2024

Describe the feature

It would be usefull to set the hostname in replacement of the default localhost

"scripts": {
  "dev": "nuxt --hostname myhost"
}

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

@moshetanzer
Copy link

Hi, what would this help with?

@hugobqd
Copy link
Author

hugobqd commented Mar 21, 2024

Hi, what would this help with?

We are dealing with multiple Nuxt apps, connecting with each other. Working localy with localhost and arbitrary port number (3000, 3001, 3002) is problematic.

@danielroe danielroe transferred this issue from nuxt/nuxt Mar 21, 2024
@moshetanzer
Copy link

hi @hugobqd,

Nuxt allows you to define host name using the --host or -h flag which you can define as whatever you wish, however you need to make sure to create that host on your computer before? i.e. if you add a host in your host file called myapp1 you could run pnpm dev --host myapp1 when running the app and it will run at that host.

If you share your system could maybe help you create additional hosts 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants