redis-browser

Web-based Redis browser that can work as standalone app or mounted Rails engine

  • 所有者: humante/redis-browser
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Redis Browser Gem Version

Features

  • List all keys as tree
  • See content of all redis types
  • List pagination
  • Pretty print json values
  • Search keys
  • Can be mounted to Rails applications as engine
  • Can connect to multiple databases

Required

  • Ruby Version ">=1.9.2"

Installation

To use with ruby version < 2.2, you must install specifically from 0.4 line which is maintained in ruby-1.9.2+ branch.

$ gem install redis-browser --version '~> 0.4.0'

Otherwise install the newest version.

$ gem install redis-browser

Usage

Standalone

$ redis-browser

You can predefine a list of available connections in a YAML file in couple of ways.

connections:
  default:
    url: redis://127.0.0.1:6379/0
  production:
    host: mydomain.com
    port: 6666
    db: 1
    auth: password

Then start with

$ redis-browser --config path/to/config.yml

Or quickly connect to a database without the hassle of creating custom configuration file

$ redis-browser --url redis://hostname:6379

The connection options can also be specified in similar way to redis-cli command

$ redis-browser -h 127.0.0.1 -p 6379 -a password -n 0

Run with --help to see what other options are available.

As engine

Add to gemfile

gem 'redis-browser'

To use with ruby version < 2.2 specify the version from 0.4 line.

gem 'redis-browser', '~> 0.4.0'

And to routes.rb

mount RedisBrowser::Web => '/redis-browser'

Use config/initializers/redis-browser.rb to predefine a list of available connections

config = Rails.root.join('config', 'redis-browser.yml')
settings = YAML.load(ERB.new(IO.read(config)).result)
RedisBrowser.configure(settings)

Protect with HTTP Basic Auth

RedisBrowser::Web is a Sinatra app, so you can inject any Rack middleware into it.

# config/initializers/redis-browser.rb
RedisBrowser::Web.class_eval do
  use Rack::Auth::Basic, "Protected Area" do, username, password, username == 'foo' && password == 'bar'
  end
end

Screenshots

Browse keys
See list with pagination
ZSET support
JSON pretty print

Contributing

  1. Fork it
  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 new Pull Request

主要指标

概览
名称与所有者humante/redis-browser
主编程语言JavaScript
编程语言Ruby (语言数: 5)
平台
许可证MIT License
所有者活动
创建于2013-04-19 21:59:37
推送于2023-09-19 07:50:09
最后一次提交
发布数12
最新版本名称v0.5.1 (发布于 2017-01-02 10:44:04)
第一版名称v0.1.0 (发布于 2013-04-20 15:48:57)
用户参与
星数604
关注者数49
派生数67
提交数75
已启用问题?
问题数30
打开的问题数14
拉请求数12
打开的拉请求数3
关闭的拉请求数5
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?