cli
cli copied to clipboard
Custom hostname as local address
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
- [X] Read the contribution guide.
- [X] Check existing discussions and issues.
Hi, what would this help with?
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.
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 😄