code: function cleanup () {
      if (!server) return
  
      debug('CLEANUP')
      if (server) {
        try {
          server.close()
        } catch (err) {}
        server = null
      }
  
      // if (mapping) {
      //   clearInterval(mappingIntervalId)
      //   ports.unmapPort(mapping['public'])
      //   mapping = null
      // }
  
      setTimeout(process.exit.bind(process), 1000)
    }
docs: function createPortMapping () { return ports.mapPort({ public: pubPort, private: privPort, hijack: true }) .then(function () { mapping = { public: pubPort, private: privPort } }) .catch(function (err) { console.error('Failed to create port mapping, but continuing', err) clearInterval(mappingIntervalId) // process.exit() }) }