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

add middleware option #474

Closed
wants to merge 5 commits into from
Closed

add middleware option #474

wants to merge 5 commits into from

Conversation

deju
Copy link

@deju deju commented Oct 24, 2018

Anyone just want to serve index.html after webpack build, the router was management by front end developer. So I add middleware option, and write returnIndex.js in middleware directory.

@BigBlueHat
Copy link
Member

@deju I love the idea of this PR! Thank you.

However, we're needing to refactor http-server soon to remove our dependency on flatiron/union, so I'd rather not introduce a feature which uniquely depends on it--see #483.

Once #483 is solved, this seems like a great feature to consider for easier extensibility.

Thoughts welcome!

@thornjad
Copy link
Member

thornjad commented Aug 7, 2021

While I think this is a neat feature, I'm not so sure this is within the scope of http-server, which is a static content server. Would this be better suited as a companion package which depends on http-server, or a middleware-focused library like express?

@thornjad
Copy link
Member

Closing due to the lack of activity since opening, please discuss and reopen if this feature is still wanted

@thornjad thornjad closed this Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants