Something like https://github.com/cloudhead/node-static should be perfectly
fine for you.

Just cd to the directory with the json file, install the module (npm
install -g node-static) and type:

static

You should be able to receive the json file at
http://localhost:8080/file.json

--
Abhay Rana
http://about.me/n3m0


On Sat, Apr 27, 2013 at 10:20 PM, <[email protected]> wrote:

> This is for a class in javascript, the final project (counts as my final
> exam). The professor did not spend any time in class teaching Node, he told
> us it'd be easy enough to look it up online.
>
> The idea is to write a fullCalendar page(I've done that part) that takes
> its events from a file recieved from a server (I set the URL for the events
> using http://localhost:port#/filename). I've written the file with the
> events, and the file with the page, but I don't know how to write a node
> server that simply gives the sends the json file. I haven't been able to
> understand much of the syntax when looking up Node (my weakness is
> server-side programming).
>
> Can someone please give me an easy-to-understand example? I'm looking for
> an example of a (very) simple Node server that sends a specific file,
> preferably with some comments to help me understand the code so I may edit
> it as needed.
>
> --
> --
> 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