Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (17 sloc) 538 Bytes
noflo = require "noflo"
# @runtime noflo-nodejs
class SendResponse extends noflo.Component
description: "This component receives a HTTP request (req, res, next)
combination on on input, and runs res.end(), sending the response to
the user"
constructor: ->
@request = null
@inPorts =
in: new noflo.Port()
@outPorts = {} "data", (request) =>
@request = request "disconnect", =>
@request = null
exports.getComponent = -> new SendResponse