Skip to content

tvpavan/nutcracker-web

 
 

Repository files navigation

Nutcracker Web

Web interface plugin for nutcracker-ruby


Disclaimer

this project is still in its early stages so things could be a little bit buggy, if you find one feel free to report it @ our issue tracker.
Also nutcracker-web only supports Redis instances for now.

Dependencies

Installation

with bundler just add this line to your Gemfile and then execute bundle install

gem 'nutcracker-web'

else you can manually install it by running

gem install nutcracker-web

Usage

After starting the nutcracker service via nutcracker-ruby just activate the nutcracker-web plugin:

require 'nutcracker'
require 'nutcracker/web'

# Start nutcracker
nutcracker = Nutcracker.start(config_file: 'cluster.conf')

# Start the web service on port 1234 using Webrick
nutcracker.use(:web, Port: 1234)

# Sleeping....
nutcracker.join

you can pass default Rack options to Nutcracker#use ( like :Host, :server etc)

Custom Webserver

to use a different webserver like thin

require 'nutcracker'
require 'nutcracker/web'
require 'thin'

nutcracker = Nutcracker.start(config_file: 'cluster.conf')
nutcracker.use(:web, Port: 1234, server: :thin)
nutcracker.join

Gotchas

  • redis.conf : don't forget to configure the maxmemory attribute for each Redis instance

Developer ?

to run nutcracker-web with stub data

  • bundle install
  • run the rackup command to start the service.
  • edit example.json.
  • client Backbone app is under assets and the Sinatra backend is under the lib directory.

Packaging & Testing

  • rake compile : compile the assets into a single application.{js,css} file under the public directory
  • rake build : compile the assets & builds a new gem
  • rake test : runs the jasmine tests suite

More PNGs






Warranty

This software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.

About

Web interface plugin for nutcracker-ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published