I have an example of using dnode with express that worked about nine months
ago, but doesn't seem to work now. Here's the server part. I think the part
that changed is the last line where is hook up the dnode server to the
express server. Is there a new way to do that now?

var dnode = require('dnode');
var express = require('express');

var app = express.createServer();
var statik = express['static'];
app.use(statik(__dirname));
app.listen(3000);

var server = dnode({
  gradeScore: function (score, cb) {
    var grade = score >= 90 ? 'A' :
      score >= 80 ? 'B' :
      score >= 70 ? 'C' :
      score >= 60 ? 'D' :
      'F';
    cb(grade);
  }
});

server.listen(app);

-- 
R. Mark Volkmann
Object Computing, Inc.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to