Skip to content
Myr

Added "GET /public/*" to Static plugin, defaulting to <root>/public

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent a797342 · Browse files · 3 files+20 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+20 added−6 removed

  • tests:+7 added−1 removed
  • other:+13 added−5 removed

3 files+20 added−6 removed

modified:examples/chat/app.js+1 added-4 removed
modified:lib/express/plugins/static.js+12 added-1 removed
modified:spec/spec.plugins.static.js+7 added-1 removed
1 unmodified line
2describe 'Express'3 describe 'StaticFile'4 before5 StaticFile = require('express/plugins/static').File6 use(require('express/plugins/static').Static)6 use(require('express/plugins/static').Static, { path: 'spec/fixtures' })7 end8 9 describe '#constructor'10 it 'should accept and assign #path'
9 unmodified lines
20 }21 end22 end23 24 describe 'GET /public/*'25 it 'should transfer static files'26 get('/public/user.json').body.should.include '"name":'27 end28 end29 30 describe '#sendfile()'31 describe 'when the file exists'32 it 'should transfer the file'33 get('/public/*', function(file){
42 unmodified lines