Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Serving static files, but not from public directory?

Received: by 10.101.165.33 with SMTP id s33mr1348513ano.19.1344226488226;
        Sun, 05 Aug 2012 21:14:48 -0700 (PDT)
X-BeenThere: nodejs@googlegroups.com
Received: by 10.236.124.176 with SMTP id x36ls10979648yhh.1.gmail; Sun, 05 Aug
 2012 21:14:38 -0700 (PDT)
Received: by 10.236.75.3 with SMTP id y3mr1327291yhd.20.1344226478281;
        Sun, 05 Aug 2012 21:14:38 -0700 (PDT)
Date: Sun, 5 Aug 2012 21:14:37 -0700 (PDT)
From: tjholowaychuk <tjholoway...@gmail.com>
To: nodejs@googlegroups.com
Message-Id: <df8d55ed-d599-4ebb-a4c2-7e1e6b64637a@googlegroups.com>
In-Reply-To: <CA+m_8J3j5=jhCEBkQ_=JjuPwC67EkzKy_No9f=NKiQkX0DsM2w@mail.gmail.com>
References: <CA+m_8J3j5=jhCEBkQ_=JjuPwC67EkzKy_No9f=NKiQkX0DsM2w@mail.gmail.com>
Subject: Re: Serving static files, but not from public directory?
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_648_22595401.1344226477727"

------=_Part_648_22595401.1344226477727
Content-Type: multipart/alternative; 
	boundary="----=_Part_649_25406243.1344226477727"

------=_Part_649_25406243.1344226477727
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Don't cache with node, slap varnish in front

On Friday, 3 August 2012 07:46:37 UTC-7, Felix E. Klee wrote:
>
> What is a good module to serve some static (JavaScript) files (including 
> caching and compression)? 
>
> Desired mapping of files to URLs: 
>
>   scripts/*.js -> http://example.com/scripts/*.js (only for development) 
>   xyz.js       -> http://example.com/xyz.js 
>   app.js       -> not served (of course) 
>   package.json -> not served (of course) 
>   ... 
>
> That's it. There is no public directory in my app. 
>
> What I already looked at: 
>
> * node-static: only allows specification of a public directory which is 
>   mapped to the root of <http://example.com/>. As you can see above, 
>   this is not what I want. 
>
> * connect: will not do caching anymore ("connect.staticCache() is 
>   deprecated and will be removed in 3.0 use varnish or similar reverse 
>   proxy caches") 
>
> By the way, I plan to deploy to Nodejitsu. Does anyone know whether they 
> do automatic caching? 
>

------=_Part_649_25406243.1344226477727
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

Don't cache with node, slap varnish in front<br><br>On Friday, 3 August 2012 07:46:37 UTC-7, Felix E. Klee  wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">What is a good module to serve some static (JavaScript) files (including
<br>caching and compression)?
<br>
<br>Desired mapping of files to URLs:
<br>
<br>&nbsp; scripts/*.js -&gt; <a href="http://example.com/scripts/*.js" target="_blank">http://example.com/scripts/*.<wbr>js</a> (only for development)
<br>&nbsp; xyz.js &nbsp; &nbsp; &nbsp; -&gt; <a href="http://example.com/xyz.js" target="_blank">http://example.com/xyz.js</a>
<br>&nbsp; app.js &nbsp; &nbsp; &nbsp; -&gt; not served (of course)
<br>&nbsp; package.json -&gt; not served (of course)
<br>&nbsp; ...
<br>
<br>That's it. There is no public directory in my app.
<br>
<br>What I already looked at:
<br>
<br>* node-static: only allows specification of a public directory which is
<br>&nbsp; mapped to the root of &lt;<a href="http://example.com/" target="_blank">http://example.com/</a>&gt;. As you can see above,
<br>&nbsp; this is not what I want.
<br>
<br>* connect: will not do caching anymore ("connect.staticCache() is
<br>&nbsp; deprecated and will be removed in 3.0 use varnish or similar reverse
<br>&nbsp; proxy caches")
<br>
<br>By the way, I plan to deploy to Nodejitsu. Does anyone know whether they
<br>do automatic caching?
<br></blockquote>
------=_Part_649_25406243.1344226477727--

------=_Part_648_22595401.1344226477727--