Problem between local and uploads from a server and its web application – JavaScript – SitePoint Forums

I have one problem :

Locally my form is sent, I receive the answer by email without worries:

{status: 201, information: {…}}
FormContact.js:31 Email sent

On the other hand, the publication on Cpanel went well, the node js server starts perfectly, the site is reactjs is functional, but the contact form no longer works.

Error in console on live website:

POSITION http://chloe-sadry.fr/register 404 (Not Found)
Uncaught syntax error (in promise): unexpected token ‘

how are my files organized, here I noted the folders in bold and the files inside each folder in italics. I did not note all the files but only those which are relevant:

customer :
__to build
__Public:
_____.htaccess
_____index.html
__src :
_____FormContact.js

waiter :
__config:
_____index.js
__routes:
_____router.js
__.env
__server.js

CUSTOMER FILES IN ORDER:

.htaccess:


    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.html$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l 
    RewriteRule . /index.html [L]
 


FormContact.js:

import React, { useState } from 'react';


const FormContact = () => {

    const [email, setEmail] = useState("")
    const [fullName, setFullName] = useState('');
    const [message, setMessage] = useState('');

    const sendEmail = async(e)=>{
        e.preventDefault()
        const res = await fetch("/register",{
            method : "POST",
            headers : {
                "Content-Type":"application/json"
            },
            body:JSON.stringify({
                fullName,
                email,
                message
            })
        });
        
        const data = await res.json();
        console.log(data);

        if(data.status === 401 || !data){
            console.log("error")
        }else{
            
            console.log("Email envoyé");
            setFullName("")
            setEmail("")
            setMessage("")
        }
    }
    return (
        <>
            
            
setFullName(e.target.value)} required type="text" placeholder="Prénom Nom" className="fullname" /> setEmail(e.target.value)} required/>