Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.05 KB

README.md

File metadata and controls

50 lines (32 loc) · 1.05 KB

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.