Skip to content
Myr

users.js

This file

Path

examples/content-negotiation/users.js

18 lines · 369 bytes · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 34c83d7 point at it.

3.4.7Jonathan Ongbefore adoption34c83d7

lines 1–18why, one step back
1
2var users = require('./db');34exports.html = function(req, res){5 res.send('<ul>' + users.map(function(user){6 return '<li>' + user.name + '</li>';7 }).join('') + '</ul>');8};910exports.text = function(req, res){11 res.send(users.map(function(user){12 return ' - ' + user.name + '\n';13 }).join(''));14};1516exports.json = function(req, res){17 res.json(users);18};