code: function (callbackFn) {
              var self = this;
              request.post(this.options.hostAndPort + '/phantom/functions/exit', {
                      form:{
                      }
                  },
                  function (error, response, body) {
  
                      if (response && response.statusCode === 200) {    //server up
                          self.server.close();
                          callbackFn && callbackFn.call(self, true);
                      }
                      else {    //server down
                          callbackFn.call(self, false);
                      }
                  });
          }
docs: terminates phantomjs process