     unless @servers[port]
       @sendError("Port #{port} not listened to")
       return
-    @servers[port].close()
+    @servers[port].server.close()
     delete @servers[port]
 
   shutdown: ->

      listen: new noflo.Port 'number'
      close: new noflo.Port 'number'
    @outPorts =
      server: new noflo.Port 'object'
      error: new noflo.Port 'object'


    if @servers[port]
      @sendError("Port #{port} already in use")
      return
    try
      app = express()
      server = app.listen(port)
      @servers[port] =
        app: app
        server: server
      if @outPorts.app.isAttached()
        @outPorts.app.send(app)
        @outPorts.app.disconnect()
      if @outPorts.server.isAttached()
        @outPorts.server.send(server)
        @outPorts.server.disconnect()
