Deployment Notes
Solution 1
On some platform such as Heroku, they have buildpack
which can detect the project and deploy it automatically.
- Please use
run_npm_command_at_root
to make sure thepackage.json
exists at the root directory. Run NPM command at root directory - Enable the
Javascript buildpack
on Heroku, so Heroku will detectpackage.json
and runnpm run build
during the deployment. Using Multiple Buildpacks for an App - If you want to specify the version of
node
,npm
, please check https://devcenter.heroku.com/articles/nodejs-support#supported-runtimes
Solution 2
Another solution is Docker, we can write code in Dockerfile
to deploy.
One example file is on https://github.com/AccordBox/django-heroku-docker/blob/master/Dockerfile