SPM middleware for debug.


Keywords
spm, middleware
License
MIT
Install
npm install serve-spm@0.5.10

Documentation

Serve SPM

NPM version Build Status Coverage Status NPM downloads

Middleware for spm debug, support connect, express and koa.

Usage

with express:

var serveSPM = require('serve-spm');
require('express')().use(serveSPM(pkgRoot, {
  log: true
}));

with koa:

var serveSPM = require('serve-spm').koa;
require('koa')().use(serveSPM(pkgRoot, {
  log: true
}));

Options

log

Enable log for requests, default false.

paths

Map pathname for debug. e.g. paths: [['/a/b/c/', '']]

cache

Enable 304 cache.

base

Set seajs's base.

LICENSE

Copyright (c) 2014 sorrycc. Licensed under the MIT license.