Deploy to Heroku

Hello! I’m having some difficulties deploying our project to Heroku.

The frontend is React, the backend is Django-Rest-Framework, and the database is PostgreSQL. It runs locally with 2 servers.

I’m basically brand-new to Heroku, so what do I need to do? Does the database need to be stored on another site? Will it realize there’s Django and React?

Have you been through any of these?

All you need is for your django settings to use environmental variables instead of directly inserting the database credentials (not secure and github will send you a warning).

But first you have to enable a free plugin that gives you a small instance of Postgres on Heroku.

Will it realize there’s Django and React?

It will recognize Django for sure, but your SPA (react, angular, vue) frontend must be hosted somewhere else like Netlify or Github Pages. And from there you connect to your newly created heroku-hosted RESTful API.

@Jasonmfetzer: I’m about halfway through this video, it’s pointed out a few things we missed so I’ll keep with it.

@luishendrix92: One of my classmates was able to host his Node.js with React project on Heroku. Is it causing a problem because we have Django and React together?

Edit: I’ve got a blank page loading now, and the error log says it “could not connect to server; No such file or directory.”
https://carbcount.herokuapp.com/

I am glad to hear it assisted in some way. I did Coding For Entrepreneurs for a bit (great series), and Justin Mitchell has some good stuff on these topics if you can find his free stuff. Python Anywhere is solid too. Maybe if there are gaps in the project structure you have, you could find some other deploy videos on YouTube to compliment. Best of Luck.