Jump To …

ping.coffee

src/controllers/

Sends {"hello":["world"]} in JSON

exports.index = (req, res) ->
  data = {"hello":["world"]}
  res.send data
  

Sends anything from request back as JSON

exports.pong = (req, res) ->

Create ping-pong response from received data

  data = 
    pongQuery: req.query
    pongBody: req.body
    pongParams: req.params
    pongCookies: req.cookies
    id: req.params.id
    controller: req.params.controller
    method: req.params.method

Send response object as JSON

  res.send data

generated Sun Dec 23 2012 16:04:40 GMT-0800 (PST)