Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with connect-static-file middleware #57

Open
skleeschulte opened this issue May 19, 2017 · 0 comments
Open

Not compatible with connect-static-file middleware #57

skleeschulte opened this issue May 19, 2017 · 0 comments

Comments

@skleeschulte
Copy link

connect-static-file middleware does not work with union. With connect, it works as expected:

var connect = require('connect')
  , http = require('http')
  , staticFile = require('connect-static-file');

var app = connect()
  .use(staticFile('index.js'));

http.createServer(app).listen(3000);

With union, the browser never gets a response (loading and loading and loading)...:

var connect = require('connect')
  , union = require('union')
  , staticFile = require('connect-static-file');

var server = union.createServer({
  buffer: false,
  before: [
    staticFile('index.js')
  ]
}).listen(3000);

connect-static-file uses send under the hood. Tested with:

"connect": "^3.6.2",
"connect-static-file": "^1.2.0",
"union": "^0.4.6"
node v6.10.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant