   if changedCount
     console.log '\nnew branches!'
 
-    recentlyChanged = true
-    serverResults   = newResults
+    lastChange    = Date.now()
+    serverResults = newResults
 
     fetchMilestones (activeMilestones) ->
       addGithubData changedServers, changedCount, activeMilestones

    # res.header 'Access-Control-Allow-Origin', 'http://stgr.thrillist.com'
    res.header 'Access-Control-Allow-Origin', '*'
    res.json
      recentlyChanged : recentlyChanged

  list: (req, res) ->
    console.log '\nOMG, a request!'
    console.info 'request made for:\n' + req.url

    res.header 'Access-Control-Allow-Origin', '*'

    # if verbose query param is set, send detailed list
    unless /^$|true/.test req.query.verbose
      res.json
        recentlyChanged : recentlyChanged
        data            : serverResults
    else
      res.json
        recentlyChanged : recentlyChanged
        data            : serverData


###

githubRepo  = 'Thrillist/Pinnacle'
pinnacle    = github.repo githubRepo

queryIntervalInMinutes = 10
queryInterval = 1000 * 60 * queryIntervalInMinutes
serverResults = {}
lastChange    = 0
serverData    = {}
serverList    = [
  'stage01.thrillist.com'
  'stage02.thrillist.com'
  'stage03.thrillist.com'
  'stage04.thrillist.com'
  'stage01.supercompressor.com'
  'stage02.supercompressor.com'
]

###
helper utilities
###
devLog = (msg) ->
  console.log msg

printLineBreak = ->
  console.log '\n'

###
init
