Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Rishi Raj rishiraj824

🏠
Working from home
View GitHub Profile
@rishiraj824
rishiraj824 / ssr-guide.md
Last active Jan 19, 2020
Going about SSR in a CRA app.
View ssr-guide.md

Ideally the server should only be serving static files and to do that your express app should use some simple templating engine. This combined with a default loader in your HTML file should take care of the overall loading.

I have attached a prefetcher module below, a middleware, whose main purpose is to fetch the data required to render a route.

Important Steps

  1. You can have an index.marko or an index.html which will be your skeleton file. I have demonstrated it using marko.js, you can use any other templating engine.
@rishiraj824
rishiraj824 / GSoC2017_FOSSASIA_Rishi_Raj.md
Last active Feb 16, 2019
Google Summer of Code 2017 - Rishi Raj - Contributions - FOSSASIA
View GSoC2017_FOSSASIA_Rishi_Raj.md
You can’t perform that action at this time.