zendesk / radar

High level API and backend for writing web apps that use push messaging

Home Page:http://radar.zendesk.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean / define public programmatic interface

junosuarez opened this issue · comments

pseudocode:

// simple case
const Radar = require('radar')
const configuration = require('./config.json')

const server = new Radar(configuration)
server.ready.then(_ => console.log('radar started'))
// adding radar to an existing HttpServer instance
// this might have unexpected behavior due to middleware ordering, but is useful for things like testing
const Radar = require('radar')
const configuration = require('./config.json')
const http = require('http')

const server = http.createServer()
const radar = new Radar(server, configuration)

Main export should be RadarServer constructor