I have 2 applications. Client is developed on react js and server is developed on spring boot using RESTful api. Both are working fine on localhost. I tried to deploy both apps on heroku. Server is working fine with postgres db on heroku (checked on postman). However, when I deployed react app on heroku as seperate app, its only showing me UI without data (from spring boot webservice). I changed the web service URL (used locally as http://localhost:8080) in react app to heroku server app URL(provided by heroku). Now its working. But, I don't know whether its correct way to configure.
Do anybody know, how to deploy server (Spring boot) and client (React js) both on heroku in right way?