Nuxt.js 启动服务配置ip访问、端口号

Nuxt.js 的相关文档

https://zh.nuxtjs.org/

package.json文件的配置

{
  "name": "test",
  "version": "1.0.0",
  "description": "My premium Nuxt.js project",
  "author": "sintina",
  "private": true,
  "scripts": {
    "dev": "nuxt --hostname 0.0.0.0 --port 3001", // 端口3001,默认是3000
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "cross-env": "^5.2.0",
    "nuxt": "^2.4.0",
    "element-ui": "^2.4.11"
  },
  "devDependencies": {
    "nodemon": "^1.18.9"
  }
}

 

你可能感兴趣的:(javascript,nuxt.js)