Foreword
We all know that when vue project on, he will give you an address and you only have to enter its address in order to enter into the corresponding service in the server
and vue service when open does not automatically enter into service
- Like this :
So how can we make our service to automatically open and enter 127 can enter it?
Step 1:
Create a vue.config.js file (right-click the new file) in the root directory of the project vue
Step 2:
write to the file
module.exports = {
devServer:{
open:true, // 自动开启
port:80, // 设置端口号
host:"127.0.0.1"// 设置 host
}
}
Step 3:
Restart your service
and it will automatically open the project, and is your address 127.0.0.1