 
     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)

      console.log 'Server running at: ', _server.info.uri
      return _server

  _configureServerOptions = ->
    tlsOptions = []


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

  # Public: returns private property _server
  #
  # Returns the _server as `undefined`.
  getServer: ->
    _server

  # Public: stops a running server
  #
  stop: ->
    _server?.stop()
    console.log 'Server stopped'

  # Public: Starts the server
  #
  # Returns the the underlying server engine as a promise.
  start: ->
    # create new server
    options = _configureServerOptions()
