jnordberg / wintersmith

A flexible static site generator
http://wintersmith.io/
MIT License
3.5k stars 335 forks source link

Preview callback doesn't return server instance correctly #222

Closed robinvdvleuten closed 5 years ago

robinvdvleuten commented 10 years ago

Hi,

When I register a callback on the preview method like this:

wintersmith('config.json').preview(function(error, server) {
    if (error) {
      throw error;
    }

    console.log(server);
});

The server variable is an array with error and server instance:

{ '0': null,
  '1': 
   [ [ undefined, undefined ],
     { domain: null,
       _events: [Object],
       _maxListeners: 10,
       _connections: 0,
       connections: [Getter/Setter],
       _handle: [Object],
       _usingSlaves: false,
       _slaves: [],
       allowHalfOpen: true,
       httpAllowHalfOpen: false,
       timeout: 120000,
       destroy: [Function],
       _connectionKey: '4:0.0.0.0:8080' } ] }
jnordberg commented 5 years ago

Cleaning up old issues, feel free to create a new one if this still is a problem.