Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added connect timeout

  • Loading branch information...
commit 2fde2201b663d01ade803c8d76c66e329d6acef5 1 parent 1872f73
Alex Young authored
Showing with 4 additions and 1 deletion.
  1. +2 −0  app.js
  2. +2 −1  package.json
View
2  app.js
@@ -7,6 +7,7 @@ var express = require('express@2.2.2'),
mailer = require('mailer@0.4.52'),
stylus = require('stylus@0.11.10'),
markdown = require('markdown@0.2.1').markdown,
+ connectTimeout = require('connect-timeout@0.0.1'),
sys = require('sys'),
path = require('path'),
models = require('./models'),
@@ -74,6 +75,7 @@ app.configure(function() {
app.use(express.favicon());
app.use(express.bodyParser());
app.use(express.cookieParser());
+ app.use(connectTimeout({ time: 10000 }));
app.use(express.session({ store: mongoStore(app.set('db-uri')), secret: 'topsecret' }));
app.use(express.logger({ format: '\x1b[1m:method\x1b[0m \x1b[33m:url\x1b[0m :response-time ms' }))
app.use(express.methodOverride());
View
3  package.json
@@ -18,7 +18,8 @@
"connect-mongodb": "0.2.2",
"markdown": "0.2.1",
"stylus": "0.11.10",
- "mailer": "0.4.52"
+ "mailer": "0.4.52",
+ "connect-timeout", "0.0.1"

This should be `"connect-timeout": "0.0.1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
},
"bin": {
"nodepad": "bin/nodepad.js"
Please sign in to comment.
Something went wrong with that request. Please try again.