score:-1

· firstly make your account in git and heroku

· install git and heroku on your system..if your using windows must install git bash

· make your repository in git

· now find out command below

  -git init

  -git clone {git repository url}

  -cd {repository folder name}

· copy your code on your local git repository folder

· open terminal go to your repository folder then apply below commands

  -git init

  -git add *

  -git commit -m "your comment"

  -git status

  -git push origin master

· check your git repository on git cloud

· open new terminal apply below commands

  -git clone {repository url}

  -cd {repository url}

  -heroku login

  -heroku create {name of your application on heroku}

  -git remote(to verify heroku)

  -git push heroku master

  -heroku open

**please follow above steps for deploy your code in heroku*

you can make demo node js project for heroku deployment by using below commands

  • express {name of project} --ejs
  • cd {name of project}
  • npm install
  • npm start

score:1

just wanted to share my experience since i had a similar issue when deploying to heroku using npm-run-all.

it seems like heroku runs the start script by default when building the application and is unable to run npm-run-all successfully (i found out after running heroku logs in my terminal). i originally had my scripts like this (notice how i'm using npm-run-all in my start script) and encountered an application error.

i simply changed the start script back to just node server.js and created a new script to run npm-run-all, like this. this worked for me.

(sorry about the image links. so won't let me post images unless i have at least 10 reputation.)

hope this helps anyone else encountering the same problem.

score:4

you'll need npm-run-all added to your "dependancies" and not on your "devdependancies" in your package.json.

this is because on deploying to heroku, npm prunes your "devdependancies" when making a production build.


Related Query

More Query from same tag