fw-combo

Combo handler for express applications

Usage no npm install needed!

<script type="module">
  import fwCombo from 'https://cdn.skypack.dev/fw-combo';
</script>

README

Installation

Install using npm:

$ npm install fw-combo

Usage

var express = require('express'),
    app = express(),
    statichandler = require('fw-combo');

statichandler.userCache = true;

app.get('/static', statichandler.folder('public', 'full/path/to/folder/'));

app.get('/static', statichandler.map('protected', {
    'something/foo.js": "full/path/to/something/foo.js',
    'bar.js": "full/path/to/something/bar.js'
}));

app.get('/static', statichandler.combine({
    comboBase: '/combo~',
    comboSep: '~'
}));