Message from discussion
Noob Question
Received: by 10.100.131.18 with SMTP id e18mr5014868and.21.1278502335073;
Wed, 07 Jul 2010 04:32:15 -0700 (PDT)
X-BeenThere: express-js@googlegroups.com
Received: by 10.101.145.32 with SMTP id x32ls8116443ann.0.p; Wed, 07 Jul 2010
04:32:14 -0700 (PDT)
Received: by 10.101.175.14 with SMTP id c14mr4983289anp.57.1278502334220;
Wed, 07 Jul 2010 04:32:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.91.209.16 with SMTP id l16mr604999agq.1.1278501862202; Wed, 07
Jul 2010 04:24:22 -0700 (PDT)
Received: by y4g2000yqy.googlegroups.com with HTTP; Wed, 7 Jul 2010 04:24:22
-0700 (PDT)
Date: Wed, 7 Jul 2010 04:24:22 -0700 (PDT)
X-IP: 81.187.108.206
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.6)
Gecko/20100625 Firefox/3.6.6,gzip(gfe)
Message-ID: <0d27ce4f-72b3-4f6e-82b2-899e3d633a07@y4g2000yqy.googlegroups.com>
Subject: Noob Question
From: Sammaye <sam.mill...@gmail.com>
To: Express <express-js@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi Everyone,
I'm an absolute noob to both node.js and express however have been
getting to crips and have formed a bit of a kool app however I do have
one little problem.
I am not using my node.js server directly I am accessing it through
JQuery on a Nginx server and I access it like so
"129.129.129.393:8124/?username=sam&someotherpoo=this".
It is with complicated urls like this that I start to get a problem. I
can do "/sam/this" but then I get problems with defineing the url
within the code and how express gets the url.
My current understanding is:
get(/:user/:something,function()
would get me /sam/this out of the url but how can I use proper gets
within a url that I can uniquely identify?
I mean what happens if I have another url that needs to be /post/this
and would have the same structure within the express code as the /sam/
this url?
Really what im looking for is a way to put a top level router that can
grab the url in it's raw form and operate on it to clean it up and
shove it to it's correct path. I am however unsure if that can be done
and I have to use /sam/this style urls. I know this sounds kinda weird
and probably I ain't explained it well but hopefully you'll understand
what I'm trying to do.
Also is there a api documentation for express anywhere all I see if
basic stuff I don't see a method by method/function documentation of
the framework?