第一步:找到此文件“node_modules/webpack-dev-server/lib/Server.js”,按照下图修改

angular 配置同时使用localhost和本机IP访问项目

 

二、修改配置文件package.json,见下图

angular 配置同时使用localhost和本机IP访问项目

 

三、在项目下,命令行运行 npm start,启动项目。

四、现在可以用本机IP:4200或者localhost:4200访问项目

 

转载自:https://blog.csdn.net/frank_good/article/details/79095753

相关文章:

  • 2021-09-20
  • 2021-05-20
  • 2021-08-02
  • 2021-09-11
  • 2021-10-04
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-12
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
相关资源
相似解决方案