TrevorBurnham/connect-assets — Issue #31: options.src not working as expected
Author: veerman
Created: 2011-10-13 21:51:22+00:00
State: open

This issue looks similar to https://github.com/TrevorBurnham/connect-assets/issues/23 , so please forgive me if there is overlap.

I am working on a fairly large project (https://github.com/Postmedia/timbits-example) that uses connect-assets. It seems the update to 2.1.0 has breaking changes and I am trying to find a suitable workaround. I was previously working with version 2.0.0-rc1 without issue. My working code that I was using with 2.0.0-rc1 was (yes, I was using it to serve dynamic data from two different directories):

assets = require 'connect-assets'

@server.use assets({src:"#{process.cwd()}/public"})
@server.use assets({src:"#{process.cwd()}/views"})

Let's say /public/template/story.coffee exists.

On 2.0.0-rc1 my requests to both /public/template/story.coffee and /public/template/story.js are successful.

However, on 2.1.0, both requests for /public/template/story.coffee and /public/template/story.js fail

Similarly, I am having trouble running your tests (but this may be unrelated).

Using 2.0.0-rc1, when I run /test/test.coffee and then visit http://localhost:3588/js/a.js in a browser I get javascript (success).

Using 2.1.0, when I run /test/DevelopmentIntegration.coffee (I notice /test/test.coffee has been removed) and then hit http://localhost:3588/js/a.js I get "Cannot GET /js/a.js"

Thoughts? Thanks in advance.