How to design persistence service in node.js

I'm making a rest api with express and mongo. Instead of writing out the crud operations for every model, I'm thinking of writing a common db service, as such (in db.coffee):

exports.findById = (model, req, res) ->
  model.findById req.params.id, (err, document)->
    if err
      throw err
    return document

So if I want to get a user from a userid, I'll call (in user.coffee):

exports.findById = res.send db.findById(model, req, res)

which is called from app.coffee:

app.get '/user/:id', user.findById(req, res)

What do you think of this design? Is there a standard design for this?

Yes, there is.

Take a look at the rest interfaces for mongoDb. http://docs.mongodb.org/ecosystem/tools/http-interfaces/

Also, if you were to do it from the ground up, you would quickly realize that there are many edge cases your would rather not deal with.

The main problem with using mongoDB this way is that a lot of your database data will be transported in small portions over the internet and into the client for a lot of simple requests. If you were to do most of that logic on the server side you would not experience the same network latency and you app would potentially be much more responsive.