UNPKG

insight-grlc-ui

Version:

An open-source frontend for the Insight API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the garlicoin network and build your own services with it.

32 lines (24 loc) 461 B
/** * Module exports. */ exports = module.exports = setup; /** * Module dependencies. */ var http = require('http'); var send = require('send'); var root = __dirname; var swf = '/ZeroClipboard.swf'; function setup () { return http.createServer(onReq); } function onReq (req, res) { send(req, swf) .root(root) .on('error', onError) .pipe(res); } function onError (err) { res.statusCode = err.status || 500; res.end(err.message); }