Skip to content

nextorigin/godot2-dash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Godot2-Dash

Dependency Status devDependency Status Downloads

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

NPM

godot2-dash screenshot

Installation

npm install --save godot2-dash

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 ./config.json )

Usage looks something like this:

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

var dashboard = dash.createServer()

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

dashboard.listen(1338);

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)

Creates a new reactor. 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.

License

MIT