aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-07-02 22:54:50 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-07-02 22:54:50 +0200
commit350b7ac055ed6374bde8bf49278c085f583c5781 (patch)
tree1153e6dc043dff134dab3861f42fa19c76836cd1 /app.js
parent178e900fb843f29c70771226109278451fc15087 (diff)
downloadexample-collection-json-db-350b7ac055ed6374bde8bf49278c085f583c5781.tar.gz
example-collection-json-db-350b7ac055ed6374bde8bf49278c085f583c5781.tar.bz2
example-collection-json-db-350b7ac055ed6374bde8bf49278c085f583c5781.tar.xz
example-collection-json-db-350b7ac055ed6374bde8bf49278c085f583c5781.zip
o Better conneg, defaulting to c+j unless text/html is requested.
Diffstat (limited to 'app.js')
-rw-r--r--app.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app.js b/app.js
index dcbfb95..c9e8a1b 100644
--- a/app.js
+++ b/app.js
@@ -1,4 +1,5 @@
-var express = require('express')
+var accept = require('http-accept')
+ , express = require('express')
, routes = require('./routes')
, http = require('http')
, url = require('url');
@@ -14,6 +15,7 @@ app.configure(function(){
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(urlgenerator);
+ app.use(accept);
app.use(app.router);
app.use(express.static(__dirname + '/public', {maxAge: 60 * 60 * 1000}));
});