Ensono / Amido.Ecommerce.UI.Federated

Federated Modules Production Grade boilerplate for Next
MIT License
2 stars 0 forks source link

refactor(prerender): /prerender API to output serialised object #126

Open theseanco opened 1 year ago

theseanco commented 1 year ago

Refactored /prerender api to send a JSON, containing an encoded HTML string.

On the middleware side this required piping the output of the stream into a writable class in order to encode the HTML produced by renderToPipeableStream.

Future augmentations of the JSON response to contain other data should be fairly trivial.

Closes #111