Hacker News new | ask | show | jobs
by rglover 1535 days ago
The truth I learned building my own SSR JavaScript framework is that it's not that complicated, it's just made complicated.

1. Get some data from a database/source.

2. Pass that data to a template/component.

3. Convert that template/component to HTML (using the given framework's version of renderToHTML()).

4. Return the HTML to your HTTP request.

For example, here's the SSR for my framework: https://github.com/cheatcode/joystick/blob/development/node/.... It blew my mind when I wrote it because I was under the impression it would be more difficult.