var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res) {
  res.render('index', { title: 'lists' });
});

router.get('/lists.json', function(req, res) {
  res.send('lists');
});

module.exports = router;

var express = require('express');
var router = express.Router();

// GET home page
router.get('/', function(req, res, next) {
  res.render('index', { title: 'lists' });
});

// GET json representation of lists
router.get('/lists.json', function(req, res, next) {
  res.setHeader('Content-Type', 'application/json');
  res.send(JSON.stringify({ a: 1 }, null, 3));
});

module.exports = router;

Update /lists.json to send actual json data
Update /lists.json to send actual json data
