     status: 200
 
 app.get "/route/:routeId", (req, res) ->
-  console.log "Incoming Web: ", req.params
   res.set "Content-Type", "text/html"
 
   busNumber = req.params["routeId"]

# Helpers

renderSMS = (res, status, message) ->
  console.log "[Resposne (SMS)]: ", {status, message}
  truncatedMessage = message.substring 0, 160
  if truncatedMessage isnt message
    console.error "Outgoing message exceeds 160 characters (#{message.length}); truncating..."
  res.send 200, truncatedMessage # Always send 200, or Twilio won't send an SMS

renderHTML = ({res, template, partials, status, context}) ->
  console.log "[Resposne (Web)]: ", {template, status, context, partials}
  res.locals = context
  res.render template, partials: partials


app.set 'layout', 'layout'
# app.set 'partials', head: 'head'
app.engine 'mustache', require 'hogan-express'
app.use "/assets", express.static "#{__dirname}/public"
app.use express.logger()
app.use express.bodyParser()

throw "CTA API Key not configured! ($CTA_API_KEY)" unless process.env.CTA_API_KEY
app.set 'apiKey', process.env.CTA_API_KEY
