This repository has been archived by the owner. It is now read-only.

kemal-redis

Easily add Redis to Kemal

kemal-redis

Easily add Redis to your Kemal application.

Installation

Add this to your application's shard.yml:

dependencies:
  kemal-redis:
    github: sdogruyol/kemal-redis

Usage

require "kemal"
require "kemal-redis"

redis_connect # With default host and port

# Make sure to yield `env`.
get "/" do |env|
  redis.set("foo", "bar")
  foo = redis.get("foo")
  "Value of foo - #{foo}"
end

You can specify different host and port like below

redis_connect host: "177.11.22.33", port: 8801

Examples

To check more examples of Redis see crystal-redis-example.

Contributing

  1. Fork it ( https://github.com/sdogruyol/kemal-redis/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

kemal-redis

Owner
Statistic
  • 6
  • 5
  • 2
  • 0
  • 1
  • about 6 years ago
  • January 11, 2016
License

MIT License

Links
Synced at

Sun, 24 Nov 2024 11:42:14 GMT

Languages