0

I recently started using Heroku for my deployments. So far I only used it to deploy front-end react apps which were fairly straight forward. But now I am trying to deploy a full-stack react app that uses a JSON-server as the backend. During the development process, I used concurrently to run the JSON server and the react app at the same time. I am not really sure how to create a static build for it and deploy it on Heroku as a single instance since the JSON server and react-app are two separate processes. Any help here will be highly appreciated. Thank you.

Github link to the project - https://github.com/Syndicate555/IT-Logger

package.json file

file structure

Hamada
  • 1,836
  • 3
  • 13
  • 27

1 Answers1

0

I saw that you are using CRA in building your app, you have two options

  1. Create another heroku instance that acts as your JSON-Server and configure it there
  2. (preferred) - Use CRA with a express backend and use express to serve your CRA Application - Steps are here => https://dev.to/loujaybee/using-create-react-app-with-express
Ramakay
  • 2,919
  • 1
  • 5
  • 21