Depends on what you want to achieve. Typically the database data are consumed during the build (and pages thus pre-generated). If you need to access database real-time (from client-side), typically you would use serverless functions that act as a proxy between your visitors and the database. There you can store db credentials and implement some business logic. Check out this article: www.freecodecamp.org/news/how-to-make-static-site-dynamic/
Very good summary. But how can we consume our database if the backend was compiled and hosted as a static site?
Depends on what you want to achieve. Typically the database data are consumed during the build (and pages thus pre-generated). If you need to access database real-time (from client-side), typically you would use serverless functions that act as a proxy between your visitors and the database. There you can store db credentials and implement some business logic. Check out this article: www.freecodecamp.org/news/how-to-make-static-site-dynamic/
love from Bangladesh 😍