I need to config server port for Nuxt3. I try to do it so:
nuxt.config.ts
import { defineNuxtConfig } from 'nuxt3'
export default defineNuxtConfig(
vite: {
server: {
port: 5000,
},
},
})
But it doesn't work. How to set server port in Nuxt3?
As of the time of writing the answer, you can now define the port in your nuxt.config as follows:
export default defineNuxtConfig({
devServer: {
port: 3001,
},
})
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With