Liking cljdoc? Tell your friends :D

redis-embedded-clj

Clojars Project

Embedded redis for clojure - based on https://github.com/signalapp/embedded-redis

Usage

Development:

(require 'redis-embedded-clj.core)

;; Start an embedded redis with default port:
(init-rd)

;; another call will halt the previous system:
(init-rd)

;; When you're done:
(halt-rd!)

Testing:

NOTE: these will halt running rd-embedded instances

(require 'clojure.test)

(use-fixtures :once with-rd-fn)

(defn around-all
  [f]
  (with-rd-fn {:port 6379}
              f))

(use-fixtures :once around-all)

;;; You can also wrap ad-hoc code in init/halt:
(with-rd default-config
	,,, :do-something ,,,)

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close