Student | Rishi Raj |
---|---|
Github | @rishiraj824 |
Organisation | FOSSASIA |
Project | SUSI Web Chat Application using SUSI.AI Server API |
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
- You can have an
index.marko
or anindex.html
which will be your skeleton file. I have demonstrated it using marko.js, you can use any other templating engine.