lt-surge
v2.2.1
Published
A collection of connect middleware to mimic to Harp/Surge serving behaviour
Downloads
25
Readme
Lt. Surge
A collection of connect middleware to mimic to Harp/Surge serving behaviour, shamelessly ripped from Harp
Usage
var middleware = require('lt-surge');
var projectDir = 'path/to/project';
// browser-sync example
middleware: [
middleware.regProjectFinder(projectDir),
middleware.underscore,
middleware.mwl,
middleware.static,
middleware.fallback,
]
// using the convenience method
middleware: middleware.all(projectDir),
// connect example
var app = connect()
app.use(middleware.regProjectFinder(projectDir))
app.use(middleware.underscore)
app.use(middleware.mwl)
app.use(middleware.static)
app.use(middleware.fallback)