Received: by 10.227.39.84 with SMTP id f20mr451533wbe.24.1278587264876; Thu, 08 Jul 2010 04:07:44 -0700 (PDT) X-BeenThere: express-js@googlegroups.com Received: by 10.227.150.69 with SMTP id x5ls4228089wbv.2.p; Thu, 08 Jul 2010 04:07:43 -0700 (PDT) Received: by 10.227.129.83 with SMTP id n19mr505281wbs.14.1278587263689; Thu, 08 Jul 2010 04:07:43 -0700 (PDT) Received: by 10.227.129.83 with SMTP id n19mr505280wbs.14.1278587263659; Thu, 08 Jul 2010 04:07:43 -0700 (PDT) Return-Path: Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by gmr-mx.google.com with ESMTP id b23si5884981wbb.6.2010.07.08.04.07.42; Thu, 08 Jul 2010 04:07:42 -0700 (PDT) Received-SPF: pass (google.com: domain of ciar...@gmail.com designates 74.125.82.44 as permitted sender) client-ip=74.125.82.44; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ciar...@gmail.com designates 74.125.82.44 as permitted sender) smtp.mail=ciar...@gmail.com; dkim=pass (test mode) header...@gmail.com Received: by wwb24 with SMTP id 24so4335095wwb.25 for ; Thu, 08 Jul 2010 04:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=2tJmrpwVWqqjhokzV298UxeYp8pEsMNmMqh1XT9p88M=; b=V5l1uRdLWtNPkqjUA4PlpLt6PnALLw2Tm2lqJTvwAaoYy83C+ulZbSOK95WMdYkLbv ydvvDvsunC76uG8I97WBTnrFrxttLA8joFw/4XFAK9PjnTv/UqCr83tGleK/bfIMOJd/ Jm1GMhB0uH9XB0d2/jDEZ5DtsKxBsIgieks1M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=NbPYWo9NLMyEBFInNc8KfH/yYkS6+dnKldOJW+7qGzsTF84OZ3YK3d6/OSEGRSpDcp PbW1lO+Qs5cEyQ33mzGpbC6mRuYxeFCJOZiW5pMAxvCwfaYBs2oRg8HrgZn2VSQvwWjE lRF0uT9HZb1mbQGMFJgXSgQDfJcZTsJSTI7dg= MIME-Version: 1.0 Received: by 10.227.129.12 with SMTP id m12mr1684567wbs.102.1278587262444; Thu, 08 Jul 2010 04:07:42 -0700 (PDT) Received: by 10.216.185.210 with HTTP; Thu, 8 Jul 2010 04:07:42 -0700 (PDT) In-Reply-To: References: <0d27ce4f-72b3-4f6e-82b2-899e3d633...@y4g2000yqy.googlegroups.com> <50243445-d84b-47bf-8233-5cc1dccbb...@g19g2000yqc.googlegroups.com> <2fb6343f-c00d-4b57-8075-38bd341a8...@x21g2000yqa.googlegroups.com> <8cccf6d1-e6bc-4ddb-969e-f227ef8bb...@t10g2000yqg.googlegroups.com> Date: Thu, 8 Jul 2010 12:07:42 +0100 Message-ID: Subject: Re: Noob Question From: Ciaran To: express-js@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable inside a route 'this' refers to the request object, the request object contains a property 'response' so: so this.response.setCookie() etc. Does that help? -cj. On Thu, Jul 8, 2010 at 12:05 PM, Sam Millman wrote: > And again, > > how can I get an object of the response? > > I can do this.whatever for request but if I want to do response.setCookie= s() > what would I do for that? > > I do notice in the examples that this context can also be used to set the > content type within reponse headers? can this context be used to access > response methods like response.setCookies? > > On 8 July 2010 09:09, Sammaye wrote: >> >> Yet another question :) >> >> Does SSJS or specifically node have strong inheritance. >> >> I have two files: >> >> app.js >> session.js >> >> Within my app.js I include a mongo db class but I use it within >> session.js. >> >> Both are required into app.js like: >> >> var mongo =3D require("mongo"), >> =A0 =A0 session =3D require("session"); >> >> Can SSJS detect that session should have access to the same namespace >> as app.js or do I need to make the mongo object again within the >> session class? >> >> On Jul 7, 3:57=A0pm, Josef Salyer wrote: >> > awesome!! =A0Looking forward to the new version! >> > >> > On Wed, Jul 7, 2010 at 8:33 AM, vision media [ Tj Holowaychuk ] >> > >> > wrote: >> > > Hopefully late next week. The site / man pages will be generated fro= m >> > > markdown in the master branch so it will >> > > be easier for contributors as well :) >> > >> > > On Wed, Jul 7, 2010 at 7:12 AM, Dennis Bl=F6te >> > > wrote: >> > >> > >> @TJ When do you plan to release 1.0? As I said I'd like to help wit= h >> > >> the >> > >> documentation, in this case I'll wait for 1.0 and see what's missin= g >> > >> when >> > >> you publish the new site. >> > >> > >> Am 07.07.2010 um 16:07 schrieb vision media [ Tj Holowaychuk ]: >> > >> > >> > 1.0 will have better docs :) I am making sure if this lol more / >> > >> > better >> > >> > docs. I will be removing the old >> > >> > site and replacing it, along with removing the wiki pages, and >> > >> > clearing >> > >> > out all the issues >> > >> > >> > On Wed, Jul 7, 2010 at 6:41 AM, Sammaye >> > >> > wrote: >> > >> > That is awesome. I'm getting the jist of the framework now and I >> > >> > had >> > >> > to learn thrift for cassandra so it's not that bad. Just in case >> > >> > you >> > >> > havent installed thrift before it's documentation is install >> > >> > instructions (which didn't work for me so I had install it >> > >> > manually).....and that's it!!! >> > >> > >> > Though don't put the code as white text on dark background and ve= ry >> > >> > wordy like node.js, their documentation hurts my eyes and fatigue= s >> > >> > me >> > >> > easily :(. >> > >> > >> > On Jul 7, 2:26 pm, Dennis Bl=F6te wrote: >> > >> > > Hello everyone, >> > >> > >> > > > There isn't more documentation :( >> > >> > >> > > I'm currently working on a project that uses some of the >> > >> > > undocumented >> > >> > > features/plugins of express (i.e. flash, cookie, session, hooks= ) >> > >> > > and I am >> > >> > > looking forward to add documentation for these when I got the >> > >> > > project out >> > >> > > the door, because I had a hard time finding out how to get thin= gs >> > >> > > running by >> > >> > > looking through the express codebase (though it wasn't impossib= le >> > >> > > ;)). >> > >> > >> > > I hope I can publish some code examples rather sooner than late= r >> > >> > > (maybe by the end of the next week). >> > >> > >> > > =A0 Best regards, >> > >> > > =A0 Dennis >> > >> > >> > > Am 07.07.2010 um 14:53 schrieb Aaron Heckmann: >> > >> > >> > > > There isn't more documentation :( , just the code itself whic= h >> > >> > > > is >> > >> > > > documented well. The project also contains specs and examples >> > >> > > > between >> > >> > > > which should provide a big help too. >> > >> > >> > > > On 7/7/10, Sammaye wrote: >> > >> > > >> Ah yes I understand now. >> > >> > >> > > >> I was worried about duplicate urls originally but after >> > >> > > >> reading >> > >> > > >> that >> > >> > > >> page it seems as though I've got more options than I >> > >> > > >> originally >> > >> > > >> thought with URLs :) >> > >> > >> > > >> Basically I am used to defining seperate functions in i.e. >> > >> > > >> server >> > >> > > >> side >> > >> > > >> with normal url paths decoded from url rewrites (so /post/1 >> > >> > > >> becomes >> > >> > > >> post.php?id=3D1) and I was worried about trying to decode my >> > >> > > >> urls so >> > >> > > >> I >> > >> > > >> didn't get ambiquity within my app but everything seems fine >> > >> > > >> after >> > >> > > >> ready that page now. >> > >> > >> > > >> Do you know if theres a clear outline of all functions (api >> > >> > > >> documentation)? Both the wiki and the main website do not >> > >> > > >> outline >> > >> > > >> every function though they do hold some very interesting >> > >> > > >> information. >> > >> > >> > > >> Thanks, >> > >> > >> > > >> On Jul 7, 12:40 pm, Aaron Heckmann >> > >> > > >> wrote: >> > >> > > >>>http://wiki.github.com/visionmedia/express/routing >> > >> > >> > > >>> Not sur= e >> > >> > > >>> I >> > >> > > >>> understand. >> > >> > > >>> What do you mean by " but how can I use proper gets >> > >> > > >>> within a url that I can uniquely identify?" >> > >> > >> > > >>> On Wed, Jul 7, 2010 at 7:24 AM, Sammaye >> > >> > > >>> >> > >> > > >>> wrote: >> > >> > > >>>> 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 howev= er >> > >> > > >>>> I do >> > >> > > >>>> have >> > >> > > >>>> one little problem. >> > >> > >> > > >>>> I am not using my node.js server directly I am accessing i= t >> > >> > > >>>> through >> > >> > > >>>> JQuery on a Nginx server and I access it like so >> > >> > > >>>> "129.129.129.393:8124/?username=3Dsam&someotherpoo=3Dthis"= . >> > >> > >> > > >>>> 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 i= t >> > >> > > >>>> 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'l= l >> > >> > > >>>> 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? >> > >> > >> > > >>>> thanks, >> > >> > >> > > >>>> -- >> > >> > > >>>> You received this message because you are subscribed to th= e >> > >> > > >>>> Google >> > >> > > >>>> Groups >> > >> > > >>>> "Express" group. >> > >> > > >>>> To post to this group, send email to >> > >> > > >>>> express-js@googlegroups.com. >> > >> > > >>>> To unsubscribe from this group, send email to >> > >> > >> > > >>>> >> > >> > > >>>> express-js+unsubscribe@googlegroups.com >> > >> > > >>>> . >> > >> > > >>>> For more options, visit this group at >> > >> > > >>>>http://groups.google.com/group/express-js?hl=3Den. >> > >> > >> > > >>> -- >> > >> > > >>> Aaronhttp://clickdummy.net >> > >> > >> > > >> -- >> > >> > > >> You received this message because you are subscribed to the >> > >> > > >> Google >> > >> > > >> Groups >> > >> > > >> "Express" group. >> > >> > > >> To post to this group, send email to >> > >> > > >> express-js@googlegroups.com. >> > >> > > >> To unsubscribe from this group, send email to >> > >> > > >> express-js+unsubscribe@googlegroups.com. >> > >> > > >> For more options, visit this group at >> > >> > > >>http://groups.google.com/group/express-js?hl=3Den. >> > >> > >> > > > -- >> > >> > > > Aaron >> > >> > > >http://clickdummy.net >> > >> > >> > > > -- >> > >> > > > You received this message because you are subscribed to the >> > >> > > > Google >> > >> > > > Groups "Express" group. >> > >> > > > To post to this group, send email to >> > >> > > > express-js@googlegroups.com. >> > >> > > > To unsubscribe from this group, send email to >> > >> > > > express-js+unsubscribe@googlegroups.com. >> > >> > > > For more options, visit this group >> > >> > > > athttp://groups.google.com/group/express-js?hl=3Den. >> > >> > >> > -- >> > >> > You received this message because you are subscribed to the Googl= e >> > >> > Groups "Express" group. >> > >> > To post to this group, send email to express-js@googlegroups.com. >> > >> > To unsubscribe from this group, send email to >> > >> > express-js+unsubscribe@googlegroups.com. >> > >> > For more options, visit this group at >> > >> >http://groups.google.com/group/express-js?hl=3Den. >> > >> > >> > -- >> > >> > Tj Holowaychuk >> > >> > Vision Media >> > >> > President & Creative Lead >> > >> > >> > -- >> > >> > You received this message because you are subscribed to the Googl= e >> > >> > Groups "Express" group. >> > >> > To post to this group, send email to express-js@googlegroups.com. >> > >> > To unsubscribe from this group, send email to >> > >> > express-js+unsubscribe@googlegroups.com. >> > >> > For more options, visit this group at >> > >> >http://groups.google.com/group/express-js?hl=3Den. >> > >> > >> -- >> > >> You received this message because you are subscribed to the Google >> > >> Groups >> > >> "Express" group. >> > >> To post to this group, send email to express-js@googlegroups.com. >> > >> To unsubscribe from this group, send email to >> > >> express-js+unsubscribe@googlegroups.com. >> > >> For more options, visit this group at >> > >>http://groups.google.com/group/express-js?hl=3Den. >> > >> > > -- >> > > Tj Holowaychuk >> > > Vision Media >> > > President & Creative Lead >> > >> > > -- >> > > You received this message because you are subscribed to the Google >> > > Groups >> > > "Express" group. >> > > To post to this group, send email to express-js@googlegroups.com. >> > > To unsubscribe from this group, send email to >> > > express-js+unsubscribe@googlegroups.com. >> > > For more options, visit this group at >> > >http://groups.google.com/group/express-js?hl=3Den. >> >> -- >> You received this message because you are subscribed to the Google Group= s >> "Express" group. >> To post to this group, send email to express-js@googlegroups.com. >> To unsubscribe from this group, send email to >> express-js+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/express-js?hl=3Den. >> > > > > -- > Bow Chicka Bow Wow > > -- > You received this message because you are subscribed to the Google Groups > "Express" group. > To post to this group, send email to express-js@googlegroups.com. > To unsubscribe from this group, send email to > express-js+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/express-js?hl=3Den. >