Node is usually an http server like any other.  It returns whatever
response you want.  The contents of a file containing Hello world HTML text
is a good example.


On Thu, Sep 12, 2013 at 9:01 AM, Reza Razavipour
<[email protected]>wrote:

> I am not understanding the data flow from the client side JS and back end
> node.js code.
>
> So I am developing a web app, my first one ever :)
>
> Here is how I am envisioning it, the client is browser based, one URL
> only...
>
> I have a node script that is my web server, index.js, starts listening on
> 8888. I do not want this script to return HTML text, does it not have to
> return a HTML filename and not the content?
>
> I thought that UI representation and details are done in a file, HTML and
> javascript. That being the case, the node should return the name of that
> file.
>
> Am I not understanding this correctly?
>
> As far as the code running on the server, we should have a web server, I
> am creating a very light weight one with node itself. The other piece is
> business logic, I am doing that in various node scripts. No knowledge of
> HTML file details cooked into node code.
>
> All of the example I see Hello world HTML text getting send back for the
> first page. I want to send that index.html.
>
> How does one do that? or I am missing the spirit of node?
>
>
>  --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to