-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat: 🎸 Use server.origin on build output #126
Conversation
@macabeus I like this PR in concept but I think there are quite a few places where this may break things as illustrated by the tests. Will add comments on the code. EDIT: Reading the code a bit closer it make sense what you did. Let me think about this in more depth. |
As it currently stands I don't have a business case for this so I can't commit to writing this but I did spend about 45 minutes thinking through the code on how you'd achieve what you are looking for. I am happy to review a PR, but will insist on tests being robust. Below is what I'd suggest we do to do a robust job of moving prefix out of the Updating the Config and Handling Legacy Definitions:
Implementing the Prefix Change
TestsThis is quiet a large change so in addition to getting the current tests passing we should have tests that cover at a minimum:
|
Closing in favour of #128 |
Closes #120
Requires Elderjs/template#40
Now we can use the config
server.prefix
to the path prefix.For example: on the route
www.example.com/foo
, the prefix isfoo
.It's useful if you are developing a github/gitlab pages or a legacy application that just a route should work with Elder.js