 
     { tls: tlsOptions, files: files }
 
+  # Private: Generates a local self-signed cert in memory
+  #
+  # Returns the cert.
   _generateCert = ->
     cert = keypair
       name: "localhost"

      _Hapi ?= require 'hapi'
    Promise.promisifyAll(_Hapi.Server.prototype)

  getServer: ->
    _server

  stop: ->
    _server?.stop()
    console.log 'Server stopped'

  start: ->
    # create new server
    options = _configureServerOptions()


    cert

  # Private: Writes a self-signed cert to the fs
  #
  # cert - The cert generated from _generateCert.
  #
  _writeCertToFs = (cert) ->
    file.mkdirsSync path.dirname(_key)
    file.mkdirsSync path.dirname(_cert)
