Write to stdout (not stdin).

SilkJS, v8cgi, may be more appropriate for your needs if you're in an
F/CGI environment.

The basics of CGI are:

* Web server calls an executable
* Print headers (including required content type)
* Print two (or more) new lines ("\n")
* Print content (should match "Content-type: " header)
* Returns to web server without causing an exception, crashing, or
returning an error code

-L

On Fri, Feb 17, 2012 at 9:50 AM, Brett Ritter <[email protected]> wrote:
> On Fri, Feb 17, 2012 at 12:44 PM, Jeremy Darling
> <[email protected]> wrote:
>> I know you can build c/c++ applications as a CGI app, but I just can't seem
>> to figure out how to build node as a CGI app.  Anyone had any real luck with
>> this or know where to get the binaries (Linux hosting of course)?
>
> I'm a little confused...basic CGI just involves calling the program.
> So to make a node.js program usable as a CGI would be a matter of
> writing a node.js program that output HTML to STDIN, and having a
> shebang line at the top to call the node interpreter (which is why
> node has to be on the server).  It seems this is not what you're
> looking for...can you explain in more detail?
>
> (I'll assume you realize that the only benefit to calling node in this
> way is writing in javascript - you'd be losing most of the async
> benefits)
>
> --
> Brett Ritter / SwiftOne
> [email protected]
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to