--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
> > nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>
I'm not sure about that. I think require does some caching (or at
least it should). It wouldn't be hard to modify node-router to fit
the second case though.
looks really interesting - we are looking at node-router for a very
straight forward sinatra like controller w/o the extra bells and
whistles coming with Express (we don't need/want flash or haml, or sass,
...) but didn't see any info whether node-router has a "redirect"
(something we do use a lot) - if not, we'll use Express
at the moment our stack looks like:
node.js
node-router
json-template
mongo-native
looks really interesting - we are looking at node-router for a very straight forward sinatra like controller w/o the extra bells and whistles coming with Express (we don't need/want flash or haml, or sass, ...) but didn't see any info whether node-router has a "redirect" (something we do use a lot) - if not, we'll use Express
On Friday, March 19, 2010, MilesTogoe <miles...@gmail.com> wrote:
> On 03/19/2010 08:50 AM, Tim Caswell wrote:
>
> I'm not sure about that. I think require does some caching (or at
> least it should). It wouldn't be hard to modify node-router to fit
> the second case though.
>
>
>
> looks really interesting - we are looking at node-router for a very straight forward sinatra like controller w/o the extra bells and whistles coming with Express (we don't need/want flash or haml, or sass, ...) but didn't see any info whether node-router has a "redirect" (something we do use a lot) - if not, we'll use Express
>
> at the moment our stack looks like:
> node.js
> node-router
> json-template
> mongo-native
>
>
>
>
>
> On Mar 19, 11:03 am, Scott González<scott.gonza...@gmail.com> wrote:
>
>
> Thanks Tim. So the idea is to just require the module each time you want to
> create a new server?
>
> var server1 = require("./node-router");
> var server2 = require("./node-router");
>
> vs.
>
> var router = require("./node-router");
> var server1 = router.createServer();
> var server2 = router.createServer();
>
>
>
> On Fri, Mar 19, 2010 at 10:35 AM, Tim Caswell<t...@creationix.com> wrote:
>
>
> creationix/node-router is based on fu.js, but makes it a little easier
> to use for real apps. As far as I know, fu.js was just written by
> Ryan for the chat demo and isn't used for anything else.
>
>
>
>
> On Mar 19, 10:22 am, Scott González<scott.gonza...@gmail.com> wrote:
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
looks really interesting - we are looking at node-router for a very straight forward sinatra like controller w/o the extra bells and whistles coming with Express (we don't need/want flash or haml, or sass, ...) but didn't see any info whether node-router has a "redirect" (something we do use a lot) - if not, we'll use Express
On Mar 19, 2:13 pm, Scott González <scott.gonza...@gmail.com> wrote:
it probably doesnt' matter much whether we use node-router or express -
it seems node-router is just a simple js lib to add, for express we need
to use pkg mgmt or run within it's folder, on the other hand, express
might be a bit simpler w/o regex, etc
either way we're attracted to the all js approach over using ruby.
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
On Mar 19, 4:30 pm, MilesTogoe <miles.to...@gmail.com> wrote:
> Tim Caswell wrote:
> > What kind of redirect are you looking for. It's really just a simple
> > 5 line (braces and all) addition to the code in most cases.
>
> didn't know there were various kinds - basically just a "redirect
> ('/foo')" kind
The two main kinds are an HTTP redirect and an internal redirect.
With an HTTP redirect node has to return a 302 or 301 message with the
new location and the browser has to make a new request with the new
url. The url in the browser gets physically changed. With an
internal redirect, you just change internal state in the node server
to pretend that the request really came from another url and respond
as if that was the case. The browser url doesn't get changed in this
case and a second request is not needed.
oh yeah, I wasn't thinking of the http redirect - rather, just the
internal one.
next step is integrating with json-template and best way to pass vars to
the template - working with that now.