Console show this error in the picture below
I am trying to solve cors error at vue.config.js but still not working
module.exports = {
devServer: {
proxy: 'http://localhost:3000',
}
}
this Axios post API method
methods: {
// send data
async signup() {
if (this.name == "" || this.email == "" || this.password == "") {
return true;
} else {
document.querySelector("button").setAttribute("type", "button");
let result = await axios.post("http://localhost:3000/user", {
name: this.name,
email: this.email,
password: this.password,
});
if (result.status == 201) {
localStorage.setItem("user-information", JSON.stringify(result.data));
this.$router.push({ name: "Home" });
}
}
},
},