JSPM

combo-handler

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q42148F
  • License MIT

Package Exports

  • combo-handler

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (combo-handler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

combo-handler

a middleware for express and koa to handle combo url

example

express

var app = require('express')();
var comboHandler = require('comboHandler');
app.use('/',comboHandler({
    base: '/assets/'
}));
app.listen(80);

koa

var app = require('koa')();
var comboHandler = require('comboHandler/lib/koa');
app.use(comboHandler({
    base: '/assets/'
}));
app.listen(80);

navigate to http://localhost/??1.js,2.js will output combined file content from /assets/1.js and /assets/2.js