Building a basic Redis GUI using ToolJet in 5 minutes

Building a basic Redis GUI using ToolJet in 5 minutes

In this tutorial, we will quickly create an app that can connect to a remote Redis cluster and run Redis commands on it.

Login to your ToolJet installation or ToolJet cloud and create a new application. If you do not have a ToolJet cloud account, you can create one from here. If you want to deploy ToolJet on your private cloud or local machine, check out our setup guide.

Connecting to Redis

Go to datasource manager on the left sidebar of the ToolJet editor and click on the + icon. Select Redis as the data source and enter the Redis credentials as instructed.

Adding redis data source

Building the interface

Drag and drop a text area component and a button component from the right-sidebar. We will use the text field to input the Redis command. The button will be used to trigger a Redis query.

Building the interface

Querying Redis

Create a new query by clicking on the + icon of the query manager located at the bottom of the editor. Select the Redis datasource that we added in the previous section. Set {{components.textarea1.value}} as the query to bind the value in the text area as the query.

Querying Redis

Click on the button to open the inspector pane. Set run query as the action for on click event of the button. Set the query we created in the last section as the query.

Displaying the query results

Add a new text component by dragging and dropping the component to the canvas. Set {{queries.redis1.data}} as the value for the text property of the text component.

Deploy the application and launch ! Enter the Redis command in the text field and click the button, the query result will be displayed in the text component. If you want to show loading skeleton while the query is being run, set {{queries.redis1.isLoading}} as the loading state property of the text component.

PING command can be used to test if the app is working as expected. Redis server will respond with PONG if the connection is successful.

Read out Redis datasource reference for detailed documentation on how to use Redis connector.

Feel free to write to navaneeth@tooljet.io  if you need any help.