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

Returning HTML on Fastboot success prevents option of manipulating HTML afterFastboot #30

Open
lukeclewlow opened this issue Aug 23, 2017 · 3 comments

Comments

@lukeclewlow
Copy link

My use case is that I want to cache the HTML that is generated from Fastboot. I use fastboot-express-middleware as middleware with fastboot-app-server. This has an afterFastboot hook, which is only accessible on an error because index.js line 51 res.send(html) just returns the HTML rather than calling next().

What I currently do is replace that line with next() and pass through the html on the response object.

Is this something that might be good to change, and how would it affect users not using fastboot-app-server?

Happy to make a pull request if you did think this was a valid change.

@kratiahuja
Copy link
Contributor

I believe this would break existing apps. While I like the idea, if you want to cache your base page, wouldn't something like Ember-static-boot be more fitting?

I am open to calling next() as an opt-in rather than the default.

@lukeclewlow
Copy link
Author

Its slightly more complicated than I made out, and we don't want to serve a static site. Just cache the result of the fastboot rendered page so fastboot doesn't need to render it if nothing will have changed to make that necessary. The fastboot part is still very much a necessity for us.

Opting in would be great as I can see that it could be a breaking change otherwise.

@kratiahuja
Copy link
Contributor

Would you mind opening a PR with this being an opt-in functionality? And from there we can see how we want to land this.

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

No branches or pull requests

2 participants