Nuxt.js无法通过域名或局域网ip访问

释放双眼,带上耳机,听听看~!

需要修改package.json文件

加入我下面的配置即可

"config": {
    "nuxt": {
      "host": "0.0.0.0",
      "port": "3000"
    }
  },

下面是我的默认配置;

{
  "name": "nobita",
  "version": "1.0.0",
  "description": "199508.com",
  "author": "nobita",
  "private": true,
  "config": {
    "nuxt": {
      "host": "0.0.0.0",
      "port": "3000"
    }
  },
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "cross-env": "^5.2.0",
    "nuxt": "^2.3.4",
    "@nuxtjs/axios": "^5.3.6"
  },
  "devDependencies": {
    "nodemon": "^1.18.9"
  }
}

人已赞赏
知识分享

修复OneIndex文件列表按照时间排序

2020-7-29 14:07:00

知识分享

JavaScript将时间戳转换成日期

2020-7-31 14:04:00

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索