Closed colin-jack closed 11 years ago
Do you use the static middleware?
What does initializing that look like?
connect-cachify does not serve up any content. Did you expect it too? Probably a bug on my part, need better documentation...
I'm going to close this bug, please re-open if you still need help.
I'm possibly doing something wrong but I'm trying to use connect-cachify like this:
var assets = { '/public/javascripts/main.js' : [ '/public/javascripts/readingList.js', '/public/javascripts/jquery.js' ] };
app.use(cachify.setup(assets, { root: __dirname, production: true }));
...
!= cachify_js('/javascripts/main.js')
With those paths my page works OK, it brings in main.js. Unfortunately connect-cachify is not putting any content in it because it doesn't recognise the path:
''' Cachify bailing on hash... no such file /javascripts/main.js
{ [Error: ENOENT, no such file or directory '/home/colin/Development/RubymineProjects/linkedlist/web/app/javascripts/main.js'] errno: 34, code: 'ENOENT', path: '/home/colin/Development/RubymineProjects/linkedlist/web/app/javascripts/main.js', syscall: 'open' } '''
If I change it to be "cachify_js('/public/javascripts/main.js')" then cachify is happy but I get a 404 for the resource:
''' cache miss /public/javascripts/main.js cache hit /public/javascripts/main.js '''