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 baseDir option and pass-through to ecstatic #395

Closed
wants to merge 5 commits into from

Conversation

idmontie
Copy link

@idmontie idmontie commented Sep 5, 2017

Upgrade ecstatic to version 3.0.0. Use ecstatic's baseDir option
to set a base directory.

See #390

@BigBlueHat
Copy link
Member

Thanks for this PR, @idmontie.

One concern, though, is that http-server will still tie up whatever pot it's assigned to (i.e. 8080), but won't be able to serve anything else except what's under baseDir.

I fear it would encourage the wrong exceptions, such as "oh good! now http-server can serve my /blog/ directory, and my other apps can serve everything else!"--which would not be the case...

What are your thoughts on avoiding that misconception?

@BigBlueHat
Copy link
Member

#139 and #63 also feel related and worth a read.

@idmontie
Copy link
Author

idmontie commented Sep 5, 2017

@BigBlueHat That's true, I didn't think about that.

In my case, I'm emulating a production folder structure on my local system, so files are usually pushed up to a subdirectory on a server, while on my local machine, they simply live in a build folder.

I can see where the confusion lies. Maybe I can update the documentation/options docs to reflect that the port will be used, even though the files may be served with a prefix.

@BigBlueHat
Copy link
Member

That use case makes sense. If you can make that clear enough in the docs, then this is probably worth having--certainly others face the same scenario.

Thanks!

@hikumealan
Copy link

Any ETA on this? I have the same use case and would really like to see this feature.

@yashha
Copy link

yashha commented Dec 14, 2017

That would be good if you want to test the page routing when you know it will be served on a subpath in the future.

@kolisko

This comment has been minimized.

@BigBlueHat
Copy link
Member

If someone wants to bring over the goodness (tests, readme, etc) from #294 and add it to this PR (or a separate on to replace them both), I do think this is a Good Thing and would like to get it added.

@BigBlueHat BigBlueHat added major version Major, potentially breaking, change minor version non-breaking, non-trivial change new-feature and removed major version Major, potentially breaking, change labels Jun 22, 2018
@thornjad
Copy link
Member

Alright, @idmontie's #395 and @jesseditson's #294 have a one-line difference. I'm going to go with #294 because it came first

@thornjad thornjad closed this Apr 22, 2019
@MaximSagan
Copy link

Alright, @idmontie's #395 and @jesseditson's #294 have a one-line difference. I'm going to go with #294 because it came first

@thornjad This issue was closed, but neither of the PRs you mentioned were ever merged. As #294 (the one you said you'd go with) has gone stale with merge conflicts since then, I have rebased the it into #837.

@hairinwind
Copy link

Can this be merged? We do need this feature. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor version non-breaking, non-trivial change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants