Hello World in Redis
This section will excite programmers the most. Let's get our hands dirty and punch in some code. But, before that, we have to understand that Redis works on a client-server model and uses the Redis protocol to communicate with the server. For the client to connect to the server, the client has to know the location of the server. For this section, I am going to show samples using the redis-cli and Java clients.
Hello World using redis-cli
Start the Redis client Command Prompt (make sure that the server is running). Type in the following commands, as shown in the following screenshot, and see the outcome:
Get Learning Redis now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.