Skip to content

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

Notifications You must be signed in to change notification settings

spmjs/serve-spm

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •