Heres my backened code with the included routes. Im not sure if the error is located here but ive read some articles that it is most likely an issue with your backenend but i don't have the experience to detect what is wrong, Im looking to see if anyone can detect an issue. const express = require('express'); const { signup, login } = require('../controllers/auth.js'); const router = express.Router(); router.post('/signup', signup); router.post('/login', login); module.exports = router;Sigo recibiendo un error 404 por alguna razón. No estoy seguro si es mi ruta de URL o un error dentro de mi código respaldado.
const handleSubmit = async (e) => { e.preventDefault() const { username, password, phoneNumber, avatarURL } = form; const URL = 'http://localhost:5000/auth'; const { data: { token, userId, hashedPassword, fullName } } = await axios.post(`${URL}/${isSignup ? 'signup' : 'login'}`, { username, password, fullName: form.fullName, phoneNumber, avatarURL, }); window.location.reload(); }