vue项目启动时将localhost替换成指定ip地址

1.node启动vue项目时地址一般都是http://localhost:8080

2.config->index.js 中的host:‘localhost’换成host:‘你的本机ip’就可以了

module.exports = {
  dev: {
    host: '192.168.1.100'
  }
}

  

原文地址:https://www.cnblogs.com/pangguoming/p/10677510.html