Heroku is a cloud Platform as a Service (PaaS) supporting multiple programming languages that is used as a web application deployment model. Heroku lets the developer build, run and scale applications in a similar manner across all the languages(Java, Node.js, Scala, Clojure, Python, PHP, Ruby and Go).
- Direct via Redis Enterprise Cloud
- Addons using Heroku CLI
- Addons using Heroku Dashboard
You can quickly and easily get your apps up and running with Redis Enterprise Cloud directly. Follow the below steps:
Create your free Redis Enterprise Cloud account. Follow this link to create a Redis Enterprise Cloud subscription and database as shown below:
Save the database endpoint URL and password for future reference.
If you are using Heroku for the first time, create your new Heroku account through this link.
For this demonstration, we will be using a Sample Rate Limiting application.
Run the commands below to get a functioning Git repository that contains a simple application as well as a package.json file.
Go to the Heroku dashboard, click "Settings" and set REDIS_ENDPOINT_URI and REDIS_PASSWORD under the Config Vars. Refer to Step 1 for the correct values to use.
Check the logs:
Please note that this method won't allow you to choose Redis Modules while creating your Redis database. Also, it doesn't provide you with the flexibility to choose the Cloud platform of your choice. It is recommended to use Redis Enterprise Cloud directly. Click here to learn more.
In this section, we will create a Heroku account, use the Heroku CLI to login and add Redis Enterprise Cloud as an add-on.
Assuming that you have already created a Heroku, run the command to below login into Heroku:
Ensure that you don’t have existing add-ons added in your account.
Once Redis Cloud has been added, you will notice a REDISCLOUD_URL config var in your Heroku config containing the username, password, hostname and port of your first Redis Cloud database.
Go to Heroku and click on “Installed add-ons”:
Click on “Redis Enterprise Cloud” and you will be redirected to the Redis Enterprise Cloud Dashboard.
Open https://lit-island-48230.herokuapp.com/ and access the rate limiting app.
Please note that this method won't allow you to choose Redis Modules while creating a Redis database. Also, it doesn't provide you with the flexibility to choose the Cloud platform of your choice. It is recommended to use Redis Enterprise Cloud directly. Click here to learn more.
Create a Heroku account and sign-in to the dashboard.
Create a new app called "redislabs":
Select "GitHub" as a deployment method:
Before deploying the app, modify the environment variables as per your application:
Go to the "Deploy" section of the application dashboard and click on "Deploy Branch":
Click "Open App" on the top right corner.