make-middleware
v0.0.0
Published
middleware to execute a makefile
Downloads
5
Readme
Make Middleware
Connect middleware to execute make(1)
in the request / response cycle.
Useful during development as an alternative to watch(1)
. Removes the need to run a separate process.
Usage
You must provide the path to the Makefile you want to run
As a string:
var makeMiddleware = require('make-middleware')(__dirname)
As an object:
var makeMiddleware = require('make-middleware')({dirname: __dirname})
With an optional make target:
var makeMiddleware = require('make-middleware')({dirname: __dirname, target: 'fast'})
Example
var express = require('express')
, path = require('path')
, makeMiddleware = require('make-middleware')({dirname: __dirname})
var app = express()
app.use(express.static(path.join(__dirname, 'public')));
app.configure('development', function(){
app.use(makeMiddleware);
});