On some platform such as Heroku, they have
buildpack which can detect the project and deploy it automatically.
- Please use
run_npm_command_at_rootto make sure the
package.jsonexists at the root directory. Run NPM command at root directory
- Enable the
npm run buildduring the deployment. Using Multiple Buildpacks for an App
- If you want to specify the version of
npm, please check https://devcenter.heroku.com/articles/nodejs-support#supported-runtimes
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