I've created a React JS app and added a fetch() event to a class but I'm unable to work out how to locate the file path as the resulting code leads to a 404 Not Found error in the console.
LoginForm.js:11 POST http://localhost:3000/api/user-login 404 (Not Found)
I am trying to locate user-login.js within /src/api/user-login.js
This is my folder structure:
https://monosnap.com/direct/DT5zykUaHOVz8YMJy9O96B762bOsvQ
Here is the relevant code within the class from LoginForm.js:
class LoginForm extends React.Component {
    handleSubmit(event) {
        var user = {
            'clientname': 'client name here',
            'email': 'client email here'
        };
        fetch('/api/user-login', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json'
            },
            body: JSON.stringify(user)
        })
    }
    render() {
        // Stuff that gets rendered
    }
}
I have attempted every variation of /app/user-login that I can think of, including:
app/user-login
app/user-login.js
/app/user-login
/app/user-login.js
./app/user-login
./app/user-login.js
../app/user-login
../app/user-login.js
Could somebody please enlighten me on how I can link to this file? Sorry if this is a stupid question, I've only been learning React JS for a couple of days. Thanks for your help.
