vantage
vantage copied to clipboard
Listen callback does not fire until first connection
When using vantage in standalone mode, the listen callback does not fire until I connect to it with the command line client.
var Vantage = require('vantage');
var vantageServer = new Vantage();
vantageServer
.delimiter('$')
.listen(2001, function() {
console.log('Started vantage server at http://localhost:2001');
});
This is by design, see https://github.com/dthree/vantage/blob/7e5a8019591f14bd0836875589c4795730c9e88c/lib/server.js#L195 - the callback is called on the socket connection event, not when the vantage server is initialised.