Easily run your backend server code in node.js on HEROKU

Mohammad Farman Abbasi
1 min readOct 9, 2020
Photo by Umberto on Unsplash

I believe that whoever wants to run their server on Heroku is having their server.js file ready and running on their local machine.

Steps

# Goto the package.json file and node version you are using like shown below.

# Create a Procfile (with P capital )in the root directory of your backend application, with content,

web: node server.js

//server.js is to be replaced by your file name

# Push your code to Github and then goto Heroku and select Github for deployment and select the branch and deploy.

Thats it.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Mohammad Farman Abbasi
Mohammad Farman Abbasi

Written by Mohammad Farman Abbasi

Learning each day without giving up.

No responses yet

Write a response