Open jackblackCH opened 10 years ago
Starting with version 0.8.0-beta8 you have control over the server from server.js
directly in the project root dir. This is the intended place to add your required middlewares (app.use()
). No need to go editing in xtc/
.
I will look into providing some sensible defaults and options and invalidating them via the dist build tasks. The issue you're describing should not be relevant in development environments.
While optimizing my site, I found out that all assets are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers.
It would be nice to set the cache headers somehow (i.e in the a config file).
Currently I added the 'maxAge' value directly in /xtc/app.js.
app.use(cfg.staticBaseUri, express.static(cfg.staticPath, { maxAge: 31557600000 }));
Informations about cookies and headers in express here: http://expressjs.com/api.html#res.cookie