Received: by 10.236.176.66 with SMTP id a42mr949817yhm.22.1344005255363; Fri, 03 Aug 2012 07:47:35 -0700 (PDT) X-BeenThere: nodejs@googlegroups.com Received: by 10.236.121.203 with SMTP id r51ls8446413yhh.5.gmail; Fri, 03 Aug 2012 07:47:10 -0700 (PDT) Received: by 10.236.179.72 with SMTP id g48mr868155yhm.37.1344005230061; Fri, 03 Aug 2012 07:47:10 -0700 (PDT) Received: by 10.236.179.72 with SMTP id g48mr868154yhm.37.1344005230050; Fri, 03 Aug 2012 07:47:10 -0700 (PDT) Return-Path: Received: from mail-yx0-f178.google.com (mail-yx0-f178.google.com [209.85.213.178]) by gmr-mx.google.com with ESMTPS id n2si814803anp.3.2012.08.03.07.47.09 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 03 Aug 2012 07:47:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.178 is neither permitted nor denied by best guess record for domain of fe...@f76.eu) client-ip=209.85.213.178; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.213.178 is neither permitted nor denied by best guess record for domain of fe...@f76.eu) smtp.mail=fe...@f76.eu Received: by mail-yx0-f178.google.com with SMTP id l6so899254yen.9 for ; Fri, 03 Aug 2012 07:47:09 -0700 (PDT) d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:from:date:x-google-sender-auth :message-id:subject:to:content-type:x-gm-message-state; bh=TdE84y2vf25g+KhfNuWcph8qyW86pVWMYqsCStJVnTc=; b=hUZEMEet5+3pyYfr1uPb9cIgubN1sib2rhT/5M3yrLWcvUj7IjrcqnPVQpVkwUXFrX jZ73sfHskopGae1yMdfxCJPIVahy7sxZO2JxRUCoOMyP8KlQTILH4dd11sKysz2C5M59 1XlW7NPfkXrmuRHae+Gbi1joepayqKzjRty5icQGMYNNeFOLhpu/SUfVIwbE7omVXNRR pp4SsUDiXuw8fvdvshCOgjzYdPzp3e4GZ8Q5XxwnaY633t4uvb5b+LwhBHnjjGG5lqI5 iMemOqp2+pys0Kzvw7nFQqhAnu1Qgxi8bVK64gGxI5UAvB6f/ry26S6Olz8xD66s/mvv pKdQ== Received: by 10.50.196.232 with SMTP id ip8mr3846670igc.50.1344005229100; Fri, 03 Aug 2012 07:47:09 -0700 (PDT) MIME-Version: 1.0 Sender: fe...@f76.eu Received: by 10.64.166.3 with HTTP; Fri, 3 Aug 2012 07:46:37 -0700 (PDT) X-Originating-IP: [87.178.191.6] From: "Felix E. Klee" Date: Fri, 3 Aug 2012 16:46:37 +0200 Message-ID: Subject: Serving static files, but not from public directory? To: nodejs@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkZie/MboZYnyLvWmCSotvuU2L5zX8DkYiJgXEAXwrI3THP0IKIvsfQaLOl+lRyg9sPyshM 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 . 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?