RE: RE: Nuxt开发指南
You are viewing a single comment's thread from:

RE: Nuxt开发指南

Words
0
Reading
0 min
Listen
Play
7M
//开发环境
//package.json
"dev": "nuxt dev --port 3200"
// 或是这样:
"config": {  // here are the changes
    "nuxt": {
        "host": "0.0.0.0",
        "port": "3333"
    }
}
//或者在 nuxt.config.ts 中设置 只在开发中有效
devServer: {
  port: 9685
}
//或者,在 .env 中设置 `PORT = 9685` 即可!  
访
 if(process.server){
  console.log(566, process.env.PORT)
 } 

//设置服务器端口 port, 找到源码,直接修改即可!
 .output/server/index.mjs
//const port = destr(process.env.NITRO_PORT || process.env.PORT) || 3e3;
const port = 5896
@lemooljiang: //开发环境 //package.json | Ecency