Preparing for client development
The package I am going to use to send HTTP requests and process the HTML responses is called htmx
(https://htmx.org), which is a good choice when the server can provide all of the statement management and content generation that will be required to create the client, which is the case for the SportsStore application. To install the HTMX
package, run the command shown in Listing 20.2 in the sportsstore
folder.
Tip
Another good package to consider is Alpine (https://alpinejs.dev), which is more complex, but it makes it easier to manage state data in the browser and can more easily be used with web services that return JSON data.
Listing 20.2: Installing the htmx package
npm install [email protected]
Table 20.1 describes the package for quick reference.
Table 20.1: The client-side package
Name |
Description |