twilson63 / express-coffee

A Template for NodeJs Application using Express, CoffeeScript, Jade, Stylus, Nib
http://twilson63.github.io/express-coffee
MIT License
626 stars 152 forks source link

Express Coffee is set to compile stylus at every request on production #26

Closed droganov closed 11 years ago

droganov commented 11 years ago

Hello, I'm new to the Node and probably do something wrong, but != css('app') is not cached in production mode.

!= css('app') // 516 MS response latency
//!= css('app') // 7 MS response latency

Css link at each request is not changed and looks like

<link rel='stylesheet' href='/css/app-1793ea5a0889a0772f020b0aae293a5b.css'>

If I request CSS directly with the browser, latency is 2MS.

Am I doing something wrong or it's just a bug? I use express coffee and assets version is 2.3.3

Thank you, Serge

droganov commented 11 years ago

The problem can be fixed with:

# Add Connect Assets.
app.use assets
    detectChanges: app.settings.env is "development"