function createTodo(req, res, next) {
    if (!req.body.task) {
        req.log.warn({ body: req.body }, 'createTodo: missing task');
        next(new MissingTaskError());
        return;
    }

    var todo = {
        name: req.body.name || req.body.task.replace(/\W+/g, '_'),
        task: req.body.task
    };

    if (req.todos.indexOf(todo.name) !== -1) {
        req.log.warn('%s already exists', todo.name);
        next(new TodoExistsError(todo.name));
        return;
    }

    var p = path.normalize(req.dir + '/' + todo.name);
    fs.writeFile(p, JSON.stringify(todo), function(err) {
        if (err) {
            req.log.warn(err, 'createTodo: unable to save');
            next(err);
        } else {
            req.log.debug({ todo: todo }, 'createTodo: done');
            res.send(201, todo);
            next();
        }
    });
}
Note this handler looks in `req.params`, which means we can load request
parameters in a "mixed" way, like:

POST /todo?name=foo HTTP/1.1
Host: localhost
Content-Type: application/json
Content-Length: ...

{"task": "get milk"}

Which would have `name` and `task` available in req.params