Skip to content

Instantly share code, notes, and snippets.

@glennblock
Created November 6, 2011 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glennblock/1342632 to your computer and use it in GitHub Desktop.
Save glennblock/1342632 to your computer and use it in GitHub Desktop.
DNode server
var express = require('express');
var server = express.createServer();
var dnode = require('dnode');
server.use(express.static(__dirname));
dnode(function (client) {
this.sayHello = function (callback) {
callback('Hello from Node land');
client.sayAnotherMessage('enjoy your day');
};
}).listen(server);
server.listen(8080);
console.log('http://localhost:8080/');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment