Skip to content

Instantly share code, notes, and snippets.

@darylteo
Created December 28, 2012 16:31
Show Gist options
  • Save darylteo/4399378 to your computer and use it in GitHub Desktop.
Save darylteo/4399378 to your computer and use it in GitHub Desktop.
Require for vert.x test verticle
var v2 = require('vertx.js');
var module = require('module.js');
var instance = module(v2);
v2.logger.info(console);
console.log('Hello');
console.info('Hello');
console.warn('Hello');
console.error('Hello');
instance.hello();
console.log(vertx); // currently throws ReferenceError... separate issue (should default to undefined)
module.exports = function(vertx){
return {
'hello' : function(){
vertx.logger.info('Hello')
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment