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

Pass through bodyParser.json() middleware options #15

Merged
merged 2 commits into from
Jun 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions hookshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,21 @@ function launch_builder(info, dest_dir, repo_dir) {
builder.build();
}

// Passed through to bodyParser.json().
// https://www.npmjs.com/package/body-parser#limit
var json_options = { limit: 1 << 20 };

var webhook = hookshot('refs/heads/18f-pages', function(info) {
launch_builder(info,
path.join(home, "pages-generated"),
path.join(home, "pages-repos"));
});
}, json_options);

webhook.on('refs/heads/18f-pages-staging', function(info) {
launch_builder(info,
path.join(home, "pages-staging"),
path.join(home, "pages-repos-staging"));
});
}, json_options);

webhook.listen(port);

Expand Down