Merge pull request #77 from mfournier/rackup-example

example rack app configuration
This commit is contained in:
Kyle Kingsbury 2014-09-24 21:17:16 -07:00
commit ab25744ca8
3 changed files with 24 additions and 0 deletions

View file

@ -45,6 +45,9 @@ libraries and headers installed.
$ riemann-dash
```
Riemann-dash can also run in a web server supporting the Rack interface. An
example rackup app is found in "example/config.ru".
Development
===========

View file

@ -1,6 +1,11 @@
# Example configuration file for riemann-dash.
# Serve HTTP traffic on this port
set :port, 4567
# Answer queries sent to this IP address
set :bind, "0.0.0.0"
riemann_base = '.'
riemann_src = "#{riemann_base}/lib/riemann/dash"

16
example/config.ru Normal file
View file

@ -0,0 +1,16 @@
# Example Rack handler.
# To run riemann-dash in a Rack-compatible web server such as nginx/apache
# with phusion passenger, you can use this rackup app. Refer to your Ruby
# application server's documentation to find out how to configure it to load
# this file.
# Uncomment the following line if you installed riemann-dash outside of ruby's
# load path (ruby -e 'puts $LOAD_PATH' to check).
#$LOAD_PATH.unshift('/path/to/riemann-dash/lib')
require 'riemann/dash'
Riemann::Dash::App.load '/path/to/config.rb'
run Riemann::Dash::App