Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

heroku buildpack

* The React app build process depends on NPM, so we need Node.js. We also need Python to run Django.

* Heroku uses **buildpacks** to **transform deployed code into slugs** which can be executed by Dynos (server instances on Heroku). We’ll be needing two buildpacks. One for Node and another for Python.

* Our app would run on a Python server, even though we will use Node/NPM to build/bundle the React frontend. So the Python buildpack will be the main one in our config. The main buildpack determines the process type of the Heroku app. You can read about multiple buildpacks to understand how they work.

* You can add buildpacks via the Heroku CLI. Head back to your terminal and run the following to set/add the buildpacks we need:
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #heroku #buildpack
ADD COMMENT
Topic
Name
5+7 =