-
-
Save tanepiper/ad53c212d491167ea544 to your computer and use it in GitHub Desktop.
A small airport/seaport/dnode thing that's failing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Test</title> | |
<script src="/dnode.js"></script> | |
<script> | |
(function() { | |
DNode({ | |
clientfoo: function(message) { | |
console.log(message); | |
} | |
}).connect(function(remote, connection){ | |
remote.thing1(5, function(n) { | |
console.log(n); | |
}); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This file sits in thing1/ */ | |
var express = require('express'); | |
var airport = require('airport'); | |
var ports = require('seaport').connect(7070); | |
var server = express.createServer(); | |
server.configure(function() { | |
server.use(express.static('./../static')); | |
}); | |
var air = airport(server); | |
air({ | |
thing1: function(n, cb) { | |
cb(n * 10); | |
} | |
}); | |
ports.service('thing1', function(port, ready) { | |
server.listen(port, ready); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment