title: Reuse electron session with nightmare
body: <p>I am using Nightmare.js to print pdf's. 
  I send a request to the node server and build the page, using Nightmare to ensure the page has loaded, then print a pdf.
  But for each request I create a new electron window, how do I reuse the same window, or a pool of max X electron windows, to handle my pdf printing?</p>
  
  <pre><code>var nightmare = require('nightmare'),
      http = require('http');
  
  function createPage(o, final) {
  
      var page = nightmare()
      .goto('file:\\\\' + __dirname + '\\index.html');
      .wait(function () {
          return !!(window.App &amp;&amp; App.app); //Check Javascript has loaded
      })
  
      page.evaluate(function (template, form, lists, printOptions) {
          App.pdf.Builder.create({
              //args for building pages
          });
      }, o.template, o.form, o.lists, o.printOptions);
  
      page.wait(function () {
          return App.pdf.Builder.ready;
      })
      .pdf(form.filename, { "pageSize": "A4", "marginsType": 1 })
      .end()
      .then(function () {
          console.log('Pdf printed');
          final(true);
      })
      .catch(function (err) {
          console.log('Print Error: ' + err.message);
      });
  }
  
  http.createServer(function (request, response) {
      var body = [];
      request.on('data', function (chunk) {
          body.push(chunk);
      }).on('end', function () {
          body = Buffer.concat(body).toString();
          var json = JSON.parse(body);
          createPage(json, function (status) {
              if (status === true) {
                  response.writeHead(200, { 'Content-Length': 0 });
              } else {
                  response.writeHead(500, { 'Content-Type': 'text/html' });
                  response.write(' ' + status);
                  console.log('status error: ' + status);
              }
              response.end('End of Request \n'); //return status msg, if any
          });
      });
  }).listen(8007);
  </code></pre>
  
  <p>I am aware of all the concurrency issues that might arise by potentially  using the same electron window again before a previous print has finished, so I would like the answer to make it clear how that is avoided.</p>