用ip代替localhost

npm install ip -D
const ip
= require('ip') devServer: { port: 8082, host: ip.address(), // host: 'localhost', proxy: { '/api': { target: 'https://test.com', } }, },

 

posted @ 2020-12-31 15:53  日升月恒  阅读(291)  评论(0)    收藏  举报