http-server
                                
                                
                                
                                    http-server copied to clipboard
                            
                            
                            
                        As a user I would like the ability to specify the default landing page / 404 page / magic pages
Steps to reproduce the issue, if applicable. Include the actual command and output and/or stack trace.
Set up http-server as normal
What did you expect to happen?
Would like to see a switch or parameter for being able to specify the default page when it is not index.html. In particular for my use case, I would like this to be an extensionless 'index' or 'home' page but being able to specify it seems like the right goal.
If the issue is a feature request, what is the motivation / use case for it?
To be able to customise the default magic file. A similar approach could be used for the magic 404 page too.
Tell us about your environment
- exact http-server version:
 
0.12.3
- Node version:
 
12.18.4
- Platform:
 
Windows 10 64 bit
Other information (related issues, suggestions for a fix, etc):
Also can be useful for running React Apps which uses BrowserRouter.
I've started this here, but I have a few unit tests to fix: https://github.com/chris--jones/http-server/tree/index-and-notfound
This issue has been inactive for 180 days
Hi there @chris--jones, any update on this issue?
Hi @burkenyo, I didn't get to complete this because from memory the unit testing was a bit of a rabbit hole with intermittent failures and outdated packages. Having said that, the branch still contains all the relevant changes to have this feature functional, I guess I was hoping someone else would pick it up and finish it.
the branch still contains all the relevant changes to have this feature functional, I guess I was hoping someone else would pick it up and finish it.
Good to know, @chris--jones. I may be able to work on this.