Do you know how easy it is to create a new react app with the create-react-app command?
Now you can create an easy API with express, layers, mysql connection and some tests. All you have to do is
npm i --global @joaobuzato/create-express-api
And inside a root folder you run
npx run create-react-app myProjectName
It's done!
To make the project run, you only need to create and .env file on the root of the project, with the database credentials.
//.env
DB_HOST=localhost
DB_PORT=3306
DB_USERNAME=username
DB_PASSWORD=password