Golang + HTMX - Creating a Go webserver / HTMX Integration / Template Fragments

Аватар автора
Реактивные Сценарии
In this video, we&explore how to integrate HTMX with the Go programming language on the server. We&cover: - how to define routes and handlers with the HandleFunc function - how to return HTML templates with the html/template package - using HTMX to submit form data to the server - swapping HTML responses into the document from our Golang handlers - using template fragments to return blocks of HTML from a parent template Final code can be found on this Github repository: ☕️ ??? ?? ? ??????: To support the channel and encourage new videos, please consider buying me a coffee here: Playlist ▶️: ? ????????: 00:00 Intro 01:32 Creating a web server in Golang 06:31 Rendering template from Golang functions 09:40 Adding Context Data to templates 11:21 Displaying server data in templates 13:44 Styling list with Bootstrap 5 15:34 Submitting form with HTMX hx-post attribute 19:44 Extract Submitted Data from POST request in handler function 21:03 Returning HTML from Golang handler function 24:03 Using hx-target to swap content into targeted DOM element 26:51 Displaying feedback during request with hx-indicator 30:37 Template Fragments in Golang ?????? ?????: ? ??????? ??????? ??? ???????????: #webdevelopment

0/0


0/0

0/0

0/0