Skip to content

Commit

Permalink
allowing use for either connect or express
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgco committed May 25, 2011
1 parent 5918749 commit 7a1b6d3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/staticGzip.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ var fs = require('fs'),
path = require('path'),
mime = require('mime'),
compress = require('compress'),
staticSend = require('connect').static.send;

staticSend;
try {
staticSend = require('connect').static.send
} catch (e) {
staticSend = require('express').static.send
}
/**
* gzipped cache.
*/
Expand Down

0 comments on commit 7a1b6d3

Please sign in to comment.