I'm new to ReactJS and just finished my first project.
One of my components is a contact form that uses with a PHP file to send an email. On dev build, it works fine on localhost.
But as soon as I replace the localhost path to the PHP file to direct link and create a production build, I get a 404 for the PHP file.
Here is my folder structure
And my link to contact.php from Contact component looks like const API_PATH = '/api/contact/contact.php';
What am I doing wrong?