I have a React application that works perfectly locally. If you clone the repository and run the following command, the application will work:
npm start
However, my application relies on a local API. I have a file called db.json where data is stored. To make the application work, you need to open a second terminal and run the json-server:
npm run backend
This backend is related to json-server, which makes the JSON file work dynamically. Locally, everything works perfectly! However, when I deploy the application, for example, on Vercel, it does not load my JSON file. How can I make the application work as a whole? Is it possible to run it on Vercel?
I tried using [my-json-server.typicode]. It worked for reading, but it did not load the additional information of the application.
What steps should I take to deploy my application as a whole? Thank you.
Repository: my-costs-repo
Deploy: my-costs