Skip to content

Conversation

@DKurilo
Copy link

@DKurilo DKurilo commented Oct 29, 2017

I'm using http-server for e2e test server and it's a pity, that you don't have option to route 404 to some file.
I just added it and it work.

And thank you for http-server. :)

@maxpavlov
Copy link

@DKurilo can you solve simple conflicts and we again ask maintainers to merge?

@DKurilo
Copy link
Author

DKurilo commented Oct 12, 2018

@DKurilo can you solve simple conflicts and we again ask maintainers to merge?

Sure.
Done.

@thornjad
Copy link
Member

Serving 404s with a 200 response is an antipattern and is out of scope of http-server. As is now documented in the README, all 404s will try to serve 404.html, so that file can be used to handle the error as desired.

If you're looking for a more complete solution to SPA's, there are several other projects designed for them, including a fork of http-server, spa-http-server

@thornjad thornjad closed this Feb 28, 2019
@thornjad thornjad mentioned this pull request Dec 6, 2021
8 tasks
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

Successfully merging this pull request may close these issues.

3 participants