Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including godot-dash with all npm packages installed. Try it out:

var godotDash = require("godot-dash")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

godot-dash v0.0.1

HTTP dashboard for Nodejitsu's godot; A port of riemann-dash

Godot-Dash

A javascript, engine.io-powered dashboard for Godot. A port of riemann-dash from ruby/sinatra to node.js.

Get started

$ sudo npm install godot-dash -g
$ godot-dash

Then open http://localhost:1338 in a browser.

API

dash.createServer(options)

Use this if you want to just create a dashboard server with minimal ceremony.

Takes an options hash with the following properties:

  • mount: Where to mount the dashboard (defaults to /)
  • config: File location for the config file (defaults to ./godot-dash/config.json )

Returns an HTTP server with an extra method, register.

Usage looks something like this:

var godot = require('godot'),
    dash = require('godot-dash');

var dashboard = dash
  .createServer()
  .register(godot)
;

godot.createServer({
  type: 'tcp',
  reactors: [
    godot.reactor()
      .dashboard()
  ]
}).listen(1337);

dashboard.listen(1338);

server.register(godot)

Register the dashboard reactor with godot, as "dashboard". Returns server.

dash.middleware(options)

Returns a middleware. Options are the same as those of dash.createServer. You can use this if you want to add the godot dashboard to an existing middleware stack without creating a new server.

dash.reactor(server)

Returns a reactor constructor. Pass in an http server to attach engine.io to. You can use this in conjunction with dash.middleware to add the dashboard to an existing middleware stack.

In order to use a third-party godot reactor, one must register it with godot by running something like:


var Dashboard = dash.reactor(server); // server is an http server

godot.reactor.register('dashboard', Dashboard);

License

MIT

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free