天天看點

Vue 實作請求轉發【Vue小技巧】

通過nodejs的請求轉發到背景,

前端位址:http://localhost:8080   後端位址:http://localhost:8081

module.exports = {
    derServer:{
        proxy:{
            '/api':{
               target:'http://localhost:3000' 
           }
        }    
    }

}