All eyes on AI: 2026 predictions – The shifts that will shape your stack.

Read now
For developersHow to build a NodeJS based application on Heroku using Redis
Ajeet Raina
Ajeet Raina

#Step 1. Create Redis Cloud

Create your free Redis Cloud account. Follow this link to create Redis Cloud subscription and database as shown below:
Redis Cloud subscription and database creation page
Save the database endpoint URL and password for future reference.

#Step 2. Create a Heroku account

If you are using Heroku for the first time, create your new Heroku account through this link
Heroku account sign up page

#Step 3. Install Heroku CLI on your system

#Step 4. Login to Heroku

#Step 5. Connect your application to Redis Cloud

For this demonstration, we will be using a Sample Rate Limiting application

#Clone the repository

Run the below CLI to have a functioning Git repository that contains a simple application as well as a package.json file.

#Step 6. Setting up environment variables

Go to Heroku dashboard, click "Settings" and set REDIS_ENDPOINT_URI and REDIS_PASSWORD under the Config Vars. Refer to Step 1 for the reference.
Configuring Redis environment variables in the Heroku settings dashboard
You now have a functioning Git repository that contains a simple application as well as a package.json file, which is used by Node’s dependency manager.

#Step 7. Deploy your code

Wait for few seconds and you will see the below messages being displayed:

#Step 8. Accessing the application

Open https://rocky-lowlands-06306.herokuapp.com/ to see your application
Screenshot of the Node.js application running on Heroku