serve-spm

1.0.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i serve-spm

Weekly Downloads

74

Version

1.0.0

License

MIT

Last publish

Collaborators

  • sorrycc