Permalink
Browse files

adding basic config variable, needs to be externalized later

  • Loading branch information...
1 parent f197ca8 commit 89a2bc579b00a0ed398ba2f7f6077aba7a0d9f3d Zachary Parmley committed Aug 13, 2012
Showing with 25 additions and 0 deletions.
  1. +25 −0 BillBill.js
View
@@ -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']

0 comments on commit 89a2bc5

Please sign in to comment.