Embedded UI for any service that implements the Rancher API spec
Go to file
Vincent Fiduccia eef564975f Fix delete, style request dialog 2014-05-21 10:30:59 -07:00
bin More bootstrapify, gd-assets v2 2014-05-05 16:03:58 -07:00
public Fix delete, style request dialog 2014-05-21 10:30:59 -07:00
.ackrc Fix showing loading errors 2013-09-27 10:27:53 -07:00
.gitignore Update package.json 2014-01-14 17:25:11 -07:00
LICENSE.txt Update package.json 2014-01-14 17:25:11 -07:00
README.md Correct gd-assets example 2014-05-09 17:39:07 -07:00
assets.json Remove bootstrap, use CDN 2014-05-09 17:26:11 -07:00
package.json Fix delete, style request dialog 2014-05-21 10:30:59 -07:00

README.md

gdapi-ui

An in-browser client for Go Daddy® REST API.

Integrating with your API

See HTML UI in the API specification.

Install

git clone https://github.com/godaddy/gdapi-ui
cd gdapi-ui
npm install

Usage

Compiling into stand-alone CSS and JavaScript files

This will write files to ./compiled/{version}/, suitable for publishing to a CDN.

  ./bin/compile

Running as a standalone server

This will start a server on the given port number (default: 3000) that serves up the assets directly. This mode is mostly suitable for development of this library itself.

  ./bin/gdapi-ui [port]

Running as part of another Node.js Connect/Express service

This will add a route into your Connect/Express service to respond with the appropriate asset. This mode is suitable for integrating with an existing project that already has a server running.

var express = require('express');
var app = express();

// Your existing routes
app.get('/', function(req, res){
  res.send('Hello World');
});

var Assets = require('gd-assets');
var config = Assets.Config.load('/path/to/gdapi-ui//assets.json');
assets.middleware(app, config)

app.listen(3000);