Skip to content

Commit

Permalink
using st as static file cache
Browse files Browse the repository at this point in the history
  • Loading branch information
bodokaiser committed Apr 1, 2014
1 parent aad2cae commit 64b144b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion etc/general.json
Expand Up @@ -2,7 +2,10 @@

"name": "nearby",

"static": "/srv",
"static": {
"path": "/srv",
"passthrough": true
},

"engine": {
"views": {
Expand Down
4 changes: 2 additions & 2 deletions lib/index.js
Expand Up @@ -6,10 +6,10 @@ require('./config')(app);

require('./engine')(app);

require('./static')(app);

require('./routes')(app);

require('./static')(app);

require('./server')(app);

require('./socket')(app);
Expand Down
4 changes: 2 additions & 2 deletions lib/static/index.js
@@ -1,9 +1,9 @@
var express = require('express');
var st = require('st');

module.exports = function(app) {

var options = app.settings.static;

app.use(express.static(options));
app.use(st(options));

};
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -21,6 +21,7 @@
},

"dependencies": {
"st": "0.4.1",
"uuid": "1.4.1",
"jade": "1.2.0",
"walve": "0.0.3",
Expand Down

0 comments on commit 64b144b

Please sign in to comment.