This is the code from my HTMX crash course on YouTube. It uses a Node/Express server. All of the HTMX is in the /public
.html files.
There are several examples:
request.html
: Simple example of how to trigger events, make requests, set targets, etctemperature.html
: Simple temperature converterpolling.html
: Example of polling (making a request every x seconds) using a mock weather apisearch.html
: A contact search widgetvalidation.html
: Inline validation exampleprofile.html
: Simple profile click-to-edit
Install dependencies
npm install
Visit the html page (eg. http://localhost:3000/search.html)