Skip to content

this is helloworld redis module, just to get started. it simply use high level api to echo the entered input

Notifications You must be signed in to change notification settings

suyogdilipkale/redis-module-helloworld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Title - Redis - Writing your first helloworld redis module

Description - Your first helloworld redis module which echo user inputs

Steps to Install

Step 1 - Compile the code

  • Create redis-module-helloworld directory
  • Copy the code files in redis-module-helloworld directory
  • Execute following command to compile (install gcc compiler if not exists)
  • gcc -fPIC -shared -std=gnu99 -o sdk_module.o sdk_module.c

Step 2 - Include Module to redis (we will use redis-cli, there are other was to to include modules)

  • Make sure you redis server is running (>= redis 5.x)
  • Go to redis-cli
  • Execute MODULE LOAD /path/to/sdk_module.o

Step 3 - Test module

  • Go to redis-cli and execute your command
  • 127.0.0.1:6379> sdk.module.helloworld "your input string"
  • "your input string" 127.0.0.1:6379>

Example:

suyog@suyog-vm1:~$ redis-cli 127.0.0.1:6379> module load /home/suyog/redis-module-helloworld/sdk_module.o OK 127.0.0.1:6379> sdk.module.helloworld "Suyog Kale" "Suyog Kale" 127.0.0.1:6379>

About

this is helloworld redis module, just to get started. it simply use high level api to echo the entered input

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages