Category NodeJS
What is Basic Auth? With ExpressJS example
Sometimes you have to protect your website from unwanted access. There are many options you can choose from. One option is the so-called "basic auth," which uses the "Authorization" header in your HTTP request to verify whether you are allowed to fetch the resource or not.
In this blog post, I want to show you what basic auth is, what the pros and cons of it are, and how you can implement it in your Express.js application.
Introduction to Astro
If you're looking at frameworks for generating static websites, then you've probably come across the Astro framework. And if not, but you're interested in the topic, then I'd be happy to tell you a bit about this framework.
Astro offers many different advantages. For example, it's possible to completely pre-render your websites so that you only have HTML and CSS. However, you also have the option to define certain blocks as client-side code, so that these are inserted as JavaScript. You can use your favorite framework, whether it's React, Vue, or Svelte.
Static site generation results in extremely fast page loading times. The performance benefits are also advantageous for your search engine optimization.
By the way, the page you are currently viewing was generated using Astro!