<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express">
    <title>gmane.comp.lang.javascript.express</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/945"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/944"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/943"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/942"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/941"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/940"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/939"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/938"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/937"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/936"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/935"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/934"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/933"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/932"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/931"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/930"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/929"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/928"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/927"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.javascript.express/926"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/945">
    <title>Re: Examples of using compiled jade templates in the browser</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/945</link>
    <description>&lt;pre&gt;Out of curiosity? What kind of project layout do u use? Squid just build from a dir a to a dir b by default I use src to project root but that could be configurable 

&lt;/pre&gt;</description>
    <dc:creator>Pierre Guillaume Herveou</dc:creator>
    <dc:date>2012-05-25T20:22:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/944">
    <title>Re: Examples of using compiled jade templates in the browser</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/944</link>
    <description>&lt;pre&gt;I've created a simple too to do this: http://projects.jga.me/clientjade/  

I just run it from my makefile when I deploy.

Usage:
clientjade test1.jade test2.jade &amp;gt; templates.js

Then in your client js:
jade.render(document.getElementById('test2'), 'test2', { items: ['item1', 
'item2', 'item3'] });


On Wednesday, May 23, 2012 12:26:15 PM UTC-7, Edmund von der Burg wrote:

&lt;/pre&gt;</description>
    <dc:creator>JGAui</dc:creator>
    <dc:date>2012-05-24T16:41:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/943">
    <title>Re: ISO date to log</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/943</link>
    <description>&lt;pre&gt;Hi!

On Wed, May 23, 2012 at 1:20 PM, HG &amp;lt;hg.list-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

Is it ok to do this:

var express = require('express');
express.logger.date = function () { return new Date().toISOString(); };
var app = express.createServer();
app.use(express.logger('[:date]: :remote-addr :req[X-Forwarded-For]
:method :url HTTP/:http-version :status :res[content-length] -
:response-time ms'));

Or am I risking some problems here? Seems to work though...

&lt;/pre&gt;</description>
    <dc:creator>HG</dc:creator>
    <dc:date>2012-05-24T07:30:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/942">
    <title>Re: Examples of using compiled jade templates in the browser</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/942</link>
    <description>&lt;pre&gt;

Et voila: https://github.com/mysociety/node-jade-amd

Also on npm as 'jade-amd' 

This should work well for me - it lets me run middleware when developing 
that intercepts requests for templates compiled to javascript and compiles 
and AMD wraps them on the fly. When it comes to building the project there 
is a command line tool that compiles and wraps the templates, and also the 
runtime.js file. It uses the jade that you install using npm rather than 
embedding it so there should be no version mismatch errors.

The output is then suitable to start using with RequireJS, and can be 
optimised like any other javascript.

There is a very simple example app with a guided walk through to show you 
all the steps:

  https://github.com/mysociety/node-jade-amd/tree/master/example

Hope others find this helpful - I'll start to integrate it with our bigger 
project tomorrow so there well be some bugfixes and a new version published 
soon :)

Cheers,
  Edmund.


&lt;/pre&gt;</description>
    <dc:creator>Edmund von der Burg</dc:creator>
    <dc:date>2012-05-23T19:26:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/941">
    <title>Re: Why are all my URLs appended with #_=_</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/941</link>
    <description>&lt;pre&gt;Thanks Samal.  I didn't see this on StackOverflow for some reason.

On Wednesday, May 23, 2012 1:52:34 AM UTC-4, samal wrote:

&lt;/pre&gt;</description>
    <dc:creator>Roy Hasson</dc:creator>
    <dc:date>2012-05-23T16:33:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/940">
    <title>Re: Re: Need an idea</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/940</link>
    <description>&lt;pre&gt;My 2 cents... could we use socket.io as a back channel to pass information
to the server that would otherwise have been sent using the url... and
therefore prevent any misuse. Moreover information after processing can be
sent back via the socket for updating the view.

On Wed, May 23, 2012 at 7:30 PM, Sugarstack &amp;lt;mjadobson-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>Anand George</dc:creator>
    <dc:date>2012-05-23T16:26:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/939">
    <title>Re: Need an idea</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/939</link>
    <description>&lt;pre&gt;This is how I tackled this:

I have a helper that generates the html for an img tag. It has params for 
width, height. The url is constructed like: 
'someimg.jpg?w=75&amp;amp;h=75&amp;amp;key=A89fds'. The key is a unique generated string 
that relates to the image-name &amp;amp; w/h params. This prevents people 
overloading your server with lots of diff. sized images (because the key 
will no longer match).

I then have a middleware before my static that checks for these w/h/k 
params in urls &amp;amp; calcs whether the key is correct. It then serves up the 
resized image if its on disk, or uses graphicsmagick to resize the 
requested image and then serves that. Any errors, etc. cause the req to be 
passed to the standard static middleware.

Works pretty well, and i've had no problems with it yet. Usage in templates 
looks like this:

// eg.jade
.user
    .thumb!= img('profilepic.jpg', 150, 150)

which is pretty clean.

Generates this:
&amp;lt;div class="user"&amp;gt;
    &amp;lt;div class="thumb"&amp;gt;&amp;lt;img 
src="profilepic.jpg?w=150&amp;amp;h=150&amp;amp;k=U8wdsa9"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;</description>
    <dc:creator>Sugarstack</dc:creator>
    <dc:date>2012-05-23T14:00:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/938">
    <title>Re: Need an idea</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/938</link>
    <description>&lt;pre&gt;You keep a lot of people busy on two mailing lists for such a simple thing
:-)
Anyways, good luck with this and let us know about the final implementation.

On Wed, May 23, 2012 at 5:26 AM, Alan Hoffmeister &amp;lt;alanhoffmeister-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org


&lt;/pre&gt;</description>
    <dc:creator>Martin Wawrusch</dc:creator>
    <dc:date>2012-05-23T12:43:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/937">
    <title>Re: Need an idea</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/937</link>
    <description>&lt;pre&gt;&amp;lt; at &amp;gt;Martin that's too much work for such a simple thing :-)
If I can't use callbacks right inside view helpers by any means, I
think I'll keep my idea of "image schemas".

--
Att,
Alan Hoffmeister


2012/5/22 Martin Wawrusch &amp;lt;martin-qs6+VQBngv1Wk0Htik3J/w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;:

&lt;/pre&gt;</description>
    <dc:creator>Alan Hoffmeister</dc:creator>
    <dc:date>2012-05-23T12:26:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/936">
    <title>Re: Why are all my URLs appended with #_=_</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/936</link>
    <description>&lt;pre&gt;This comes with facebook Oauth.

this may help http://stackoverflow.com/questions/7131909/facebook-callback-appends-to-return-url

On Wed, May 23, 2012 at 4:59 AM, Roy Hasson &amp;lt;rhasson-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>samal gorai</dc:creator>
    <dc:date>2012-05-23T05:52:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/935">
    <title>ISO date to log</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/935</link>
    <description>&lt;pre&gt;Hi!

I cannot find much documentation of the express.logger format. By
googling for some examples, I'm currently running this kind of logger:

app.use(express.logger('[:date]: remote-addr :req[X-Forwarded-For]
:method :url HTTP/:http-version :status :res[content-length] -
:response-time ms'));

However, that date seems to use this:
new Date().toUTCString();

but I really want to have the date in the ISO 8601 standard format:
new Date().toISOString();

So, how do I do that?

&lt;/pre&gt;</description>
    <dc:creator>HG</dc:creator>
    <dc:date>2012-05-23T10:20:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/934">
    <title>Re: Examples of using compiled jade templates in the browser</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/934</link>
    <description>&lt;pre&gt;
Oh dear - late to the party again:
https://github.com/visionmedia/jade/issues/634

From that exchange it would seem that the best approach is a separate
npm module that can provide a AMD wrapped runtime.js, compile the
templates to AMD wrapped functions and possibly also provide an
Express middleware to serve the compiled templates during development.
In production they should be bundled up with the rest of the
javascript as required.

I'll look at implementing that instead.

Cheers,
  Edmund.


&lt;/pre&gt;</description>
    <dc:creator>Edmund von der Burg</dc:creator>
    <dc:date>2012-05-23T09:35:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/933">
    <title>Re: Examples of using compiled jade templates in the browser</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/933</link>
    <description>&lt;pre&gt;
This is very close to what I want! Especially the RequireJS wrapping.

Having looked at your code I see that what I've been looking for is
the amdWrap function in
https://github.com/pgherveou/squid/blob/master/src/lib/JadeBuilder.coffee
- ideally this would be integrated into jade itself so that we could
just call

  tplFn = jade.compile code, {filename: file, client: true, amdWrap:
'jadeName', compileDebug: false}

where 'jadeName' is the name of the jade runtime (defaults to
'jade-runtime' if the argument is 'true').

I'll ask if that change would be accepted.


Unfortunately the layout you use for your code and the layout we use
differ :( so I think it would be hard for me to use squid without
significant changes.

But thank you for pointing me at it - reading through it has shown me
how it should be done :)

Cheers,
  Edmund.



&lt;/pre&gt;</description>
    <dc:creator>Edmund von der Burg</dc:creator>
    <dc:date>2012-05-23T09:25:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/932">
    <title>Jade installation problem on express 3.0</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/932</link>
    <description>&lt;pre&gt;npm install jade
TypeError: Bad argument
npm ERR!     at Object._open (fs.js:224:11)
npm ERR!     at open (/usr/local/lib/node_modules/npm/node_modules/
graceful-fs/graceful-fs.js:73:6)
npm ERR!     at Object.open (/usr/local/lib/node_modules/npm/
node_modules/graceful-fs/graceful-fs.js:67:3)
npm ERR!     at Object.lutimes (/usr/local/lib/node_modules/npm/
node_modules/graceful-fs/graceful-fs.js:28:6)
npm ERR!     at setProps (/usr/local/lib/node_modules/npm/node_modules/
fstream/lib/writer.js:267:18)
npm ERR!     at Object.oncomplete (/usr/local/lib/node_modules/npm/
node_modules/fstream/lib/writer.js:205:7)
npm ERR! Report this *entire* log at:

&lt;/pre&gt;</description>
    <dc:creator>rkjha</dc:creator>
    <dc:date>2012-05-23T08:33:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/931">
    <title>Re: Re: Passing app to my routes.</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/931</link>
    <description>&lt;pre&gt;
You don't want to do it like this. I think you've confused adding the
session middleware to your app, and storing something in the session.

You should only do the app.use(express.session({ secret :
authorizedCode })); once in the configuration.  The 'secret' that is
passed to the session middleware when you create it is used to sign
the cookies to prevent tampering, it should be the same for all
requests.

To store something in the session you should do req.session.some_key =
some_value. Just treat req.session like an object that is saved
between requests to the browser.

The code that you have may work to begin with, but on each request you
are adding two more bits of middleware to the app so it'll gradually
slow to a crawl as it fills up.

Hope that helps - if not let me know and I'll try to be clearer.

Yours,
  Edmund.


&lt;/pre&gt;</description>
    <dc:creator>Edmund von der Burg</dc:creator>
    <dc:date>2012-05-23T08:29:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/930">
    <title>Re: How do I get the query string from a request?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/930</link>
    <description>&lt;pre&gt;

The ampersand ("&amp;amp;") is a special character for the shell. It means "run the preceding command asynchronously in the background" (instead of synchronously, in the foreground, like shell commands usually are) and it also delimits commands. Your command is getting split up by the shell into three commands:

curl localhost:3000/fetch?a=b &amp;amp;

(Asynchronously run curl; this is what caused the request to your server; the output line beginning "[1]" tells you this asynchronous command completed successfully.)

c=d &amp;amp;

(Asynchronously assign the shell environment variable c the value d; the output line beginning "[2]" tells you this asynchronous command completed successfully.)

e=f

(Synchronously assign the shell environment variable e the value f; synchronous commands do not output lines when they complete.)

What you need to do is quote your URL so the shell does not interpret any of its characters specially and instead passes the whole URL to curl unmodified. You also forgot to include the protocol (http) which &lt;/pre&gt;</description>
    <dc:creator>Ryan Schmidt</dc:creator>
    <dc:date>2012-05-23T04:22:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/929">
    <title>Re: jade question about radio button options</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/929</link>
    <description>&lt;pre&gt;Dont know the reason, but if the label starts with an uppercase letter 
sometimes fail. Use "|" as prefix to solve the problem:

div.control-group
  label.control-label Género
  div.controls
      label.radio.inline
          input(type="radio", name="optionsRadios", id="optionsRadios1", 
value="option1", checked="")
          |Male

      label.radio.inline
          input(type="radio", name="optionsRadios", id="optionsRadios2", 
value="option2")
          |Female


&lt;/pre&gt;</description>
    <dc:creator>Marcelo Tosco</dc:creator>
    <dc:date>2012-05-21T19:12:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/928">
    <title>Why are all my URLs appended with #_=_</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/928</link>
    <description>&lt;pre&gt;I have a simple Express app and whenever I call res.redirect() the 
resulting URL has a #_=_ appended to it at the end.

Any ideas why this happens?

Thanks,
Roy

&lt;/pre&gt;</description>
    <dc:creator>Roy Hasson</dc:creator>
    <dc:date>2012-05-22T23:29:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/927">
    <title>Translations (i18n) in Express</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/927</link>
    <description>&lt;pre&gt;Hi,

I found in this group a really old topic about i18n in Express. I'm now 
starting to develop a rather big application with Express and I want it to 
be internationalized.

I know Express won't have anything like that incorporated by default and I 
like it. But are any of you developers have by the time any preferences on 
which i18n module to choose? Node.js modules list&amp;lt;https://github.com/joyent/node/wiki/modules#wiki-i18n&amp;gt;has about 15 different node.js modules for this (some for l10n). Any advice 
from someone with experience in this field?

Thanks,
Piotrek

&lt;/pre&gt;</description>
    <dc:creator>Piotr Rybałtowski</dc:creator>
    <dc:date>2012-05-20T08:26:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/926">
    <title>Re: jade question about radio button options</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/926</link>
    <description>&lt;pre&gt;

div.control-group
  label.control-label Género
  div.controls
      label.radio.inline
          input(type="radio", name="optionsRadios", id="optionsRadios1", 
value="option1", checked="")
          |Male

      label.radio.inline
          input(type="radio", name="optionsRadios", id="optionsRadios2", 
value="option2")
          |Female 

&lt;/pre&gt;</description>
    <dc:creator>Marcelo Tosco</dc:creator>
    <dc:date>2012-05-21T19:13:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.javascript.express/925">
    <title>How do I get the query string from a request?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.javascript.express/925</link>
    <description>&lt;pre&gt;I would appreciate some help with a basic problem I'm having. I'm sure
there's something I'm missing in the documentation. I'm running Ubuntu
12.04 in a VM using node.js 0.6.16 and express 2.5.9.

My problem is that I am unable to grab the full query string from a
request. Here is the code I am trying to use:

"var express = require('express'), app = express.createServer();

app.get('/fetch', function(req, res) {
console.log(req);
res.send("query: " + JSON.stringify(req.query));
});

app.listen(3000);
console.log("Server started.");"

Next, I try the following command with the server running:

curl localhost:3000/fetch?a=b&amp;amp;c=d&amp;amp;e=f

Here is the response:

"[1] 5588
[2] 5589
robert&amp;lt; at &amp;gt;robert-VirtualBox:~/app$ query: {"a":"b"}
[1]-  Done                    curl localhost:3000/fetch?a=b
[2]+  Done                    c=d"

What's more is that, when I dig into the req object I logged in the
console, I see that it has the property originalUrl: '/fetch?a=b',
which is not the URL requested. Have I misconfigured Expres&lt;/pre&gt;</description>
    <dc:creator>Robert</dc:creator>
    <dc:date>2012-05-21T07:44:24</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.javascript.express">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.javascript.express</link>
  </textinput>
</rdf:RDF>

