Skip to content
This repository was archived by the owner on Dec 8, 2017. It is now read-only.

Commit 59e90e3

Browse files
committed
Merge pull request #15 from 18F/json-options
Pass through bodyParser.json() middleware options
2 parents 577a92d + abbd991 commit 59e90e3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

hookshot.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,21 @@ function launch_builder(info, dest_dir, repo_dir) {
192192
builder.build();
193193
}
194194

195+
// Passed through to bodyParser.json().
196+
// https://www.npmjs.com/package/body-parser#limit
197+
var json_options = { limit: 1 << 20 };
198+
195199
var webhook = hookshot('refs/heads/18f-pages', function(info) {
196200
launch_builder(info,
197201
path.join(home, "pages-generated"),
198202
path.join(home, "pages-repos"));
199-
});
203+
}, json_options);
200204

201205
webhook.on('refs/heads/18f-pages-staging', function(info) {
202206
launch_builder(info,
203207
path.join(home, "pages-staging"),
204208
path.join(home, "pages-repos-staging"));
205-
});
209+
}, json_options);
206210

207211
webhook.listen(port);
208212

0 commit comments

Comments
 (0)