bridge icon indicating copy to clipboard operation
bridge copied to clipboard

Hard Coded HOST and PORT (nux-bridge

Open alex-maxime opened this issue 3 years ago • 4 comments

Describe the feature

I would like to be able (like in nuxt 2) define in nuxt.config.js, the default port for the app, without using .env file or environnement variables I have already see/search in issues, none of them explain how to set it without .environnements variables in my team, we have 2 nuxt project, one running on default port, another at port 3333 we cannot run both without set a .env or use environnements variables

Additional information

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

Final checks

alex-maxime avatar Sep 19 '22 21:09 alex-maxime

You can do this with --host and --port arguments passed to nuxi: see https://v3.nuxtjs.org/api/commands/dev#nuxi-dev.

danielroe avatar Sep 19 '22 22:09 danielroe

You can do this with --host and --port arguments passed to nuxi: see https://v3.nuxtjs.org/api/commands/dev#nuxi-dev.

Thanks @danielroe . Yes, i also see this solution il the documentation. but i would like an alternative using, only config's file.

alex-maxime avatar Sep 19 '22 22:09 alex-maxime

There are reasons with nitro that we need them before the nuxt config is read - for now, you'll need to specify them either in your .env file or on the command line.

danielroe avatar Sep 20 '22 08:09 danielroe

it looks like it is merged in v3.0.0, i will test it

alex-maxime avatar Apr 18 '24 18:04 alex-maxime