Skip to content

Commit

Permalink
adding basic config variable, needs to be externalized later
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Parmley authored and Zachary Parmley committed Aug 13, 2012
1 parent f197ca8 commit 89a2bc5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions BillBill.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ var request = require('request')
var cacheDir = 'pagecache'



// TODO: Basic congig - this will be defined externally - routes are mapleTree matchable against 'url'
var config = [
{
host : 'localhost:10001',
origin : 'localhost:2020',
defaultTtl : 7200,
rules : [
{
route : '/nocache*',
ttl : 0
},
{
route : '/cache5seconds*',
ttl : 5
},
{
route : '/cache100seconds*',
ttl : 20
}
]
}
]


// Set up the server
http.createServer(function(req, resp) {
var host = req.headers['host']
Expand Down

0 comments on commit 89a2bc5

Please sign in to comment.