Files
meteor/tools/tests/apps/hot-code-push-test/hot-code-push-test.js
Matthew Arbesfeld b8ae210d9b Add documentation
2014-07-28 17:12:26 -07:00

18 lines
465 B
JavaScript

if (Meteor.isClient) {
Meteor.startup(function () {
Meteor.call("clientLoad", typeof jsVar === 'undefined' ? 'undefined' : jsVar);
});
}
if (Meteor.isServer) {
var clientConnections = 0;
Meteor.methods({
clientLoad: function (jsVar) {
// Make sure that the process still has the correct working directory.
process.cwd();
console.log("client connected: " + clientConnections++);
console.log("jsVar: " + jsVar);
}
});
}