Deploying my Django & React app to Heroku on Windows:
New steps:
heroku buildpacks:set heroku/python
heroku buildpacks:add --index 1 heroku/nodejs
Procfile
and paste web: gunicorn --pythonpath <project_name> <project_name>.wsgi --log-file -
into it (this is now different because we have the manage.py file in a different location)Procfile_windows
and paste web: py <project_name>/manage.py runserver 127.0.0.1:8000
into it and test itpackage.json
file:"scripts": {
...
"postinstall": "npm run build"
},
"engines": {
"npm": "6.14.11",
"node": "14.16.0"
},
(Some extra note: pipenv shell
can create the Python environment from an existing pipfile, npm i
creates the node_modules folder and its contents)
Links: