Numerous Pulsating Martians

    middleman-middleware

    0.0.2 • Public • Published

    NPM Version

    Middleman Middleware

    This middleware will create a mirror of a given URL response and inject given CSS and JS into the response.

    This can be used with express or any other accepting HTTP server

    Installation

    npm install middleman-middleware

    Example Usage with Express:

    var express = require('express');
    var middlemanMiddleware = require('middleman-middleware');
     
    var app = express();
     
    app.use(middlemanMiddleware({
      url: 'http://www.reddit.com',
      css: 'body{background-color: red;}',
      js: 'alert("hi reddit");'
    }));
     
    app.listen(3000);

    Keywords

    none

    Install

    npm i middleman-middleware

    DownloadsWeekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • dijs