Skip to content
Eugene Lazutkin edited this page Nov 7, 2019 · 7 revisions

Bundler is a reference implementation of heya-io's bundling protocol. It is a customizable endpoint for Express on node.js, with tightly controlled security, and flexible options.

Example of use:

var bundler = require('heya-bundler');
var express = require('express');

var app = express();
var router = express.Router();

router.put('/', bundler({
  isUrlAcceptable: function (url) {
    // accept only local absolute URLs
    return /^\/\w/.test(url);
  }
}));

app.use('/bundle', router);

// the rest of the setup

All supported parameters can be found in Instrumentation.

Don't forget to check out code snippets in the cookbooks:

Clone this wiki locally