All the necessary commands use to deploy will be there in this article.

Prerequisites

  1. Node.js and MongoDB application.
  2. Free Heroku account.
  3. Heroku CLI.
  4. GitHub account.
  5. Git (Not necessary but it’s best to push code to github using git bash).

Important lines of code to check before moving ahead.

(Find you node version by typing node --version in command prompt)

"engines": {
"node": "14.X"
}

2. specify the start command in the package.json file-: ex nodemon, nodemon server.js, npm start, etc.

"scripts": {
"start": "nodemon server.js"
}

(From 2013 procfile is not necessary for node app and it…

Umang Agrawal

Umang is a developer, tech enthusiast, and a photographer. Loves to code with coffee on desk.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store