user1889776
user1889776

Reputation: 403

Deploying a React app on Heroku

I've a React.js application which depends on an API (based on Django Rest Framework).

The React and Django applications are decoupled i.e in my local development environment, I run two servers (each using a different port), one for Django and the other for the React.

Is it possible to deploy this to a single heroku application or will I need two separate applications?

Upvotes: 0

Views: 204

Answers (1)

Nathan Loyer
Nathan Loyer

Reputation: 1349

You can use the same heroku instance if you serve the static React files from the Django app, perhaps in the public directory. Tell the Django app to respond to GET requests to / by delivering the main React html page.

Upvotes: 1

Related Questions