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

Read now
For developersHow to build a Python 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:
Image
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
Image

#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 reference.
Image

#Step 7. Deploy your code

Heroku generates a random name (in this case fast-reef-76278) for your app, or you can pass a parameter to specify your own app name. Now deploy your code:

#Step 8. Accessing the application

Open https://fast-reef-76278.herokuapp.com/ to see your application
Image