Hacker News new | ask | show | jobs
by kangoo1707 2235 days ago
Why are people slapping Static Site Generators to all the problems?

Imagine you build an e-commerce website that has ten thousands of products, that can be accessed by example.com/products/{product-slug}. Now what is making more sense: 1. Generating ten thousands of .html file for each products in the DB 2. Use routing in Nuxt like this "/products/$productSlug" and query for $productSlug in the database

To me the (2) approach is a clear winner here. And the performance only depends on how fast your API can query a single product from the database, which is pretty fast 99% of the time.