5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 02:51:56 +08:00
wails/v3/examples/gin-routing
Jason Kulatunga da99ea47b0
Update docs + examples.
Serve runtime from assetserver if requested.
Add gin guide, fix asset server merge, add gin example
adding http.CloseNotifier and http.Flusher interface to assetserver.contentTypeSniffer, for Gin (and other framework) compatibility.
2025-03-11 21:06:57 +11:00
..
static Update docs + examples. 2025-03-11 21:06:57 +11:00
go.mod Update docs + examples. 2025-03-11 21:06:57 +11:00
go.sum Update docs + examples. 2025-03-11 21:06:57 +11:00
main.go Update docs + examples. 2025-03-11 21:06:57 +11:00
README.md Update docs + examples. 2025-03-11 21:06:57 +11:00

Gin Routing Example

This example demonstrates how to use the Gin web framework as a router with Wails.

Overview

This example shows how to:

  • Set up Gin as the asset handler for a Wails application
  • Create a middleware that routes requests between Wails and Gin
  • Define API endpoints with Gin
  • Communicate between the Gin-served frontend and Wails backend
  • Implement custom Gin middleware

Running the Example

cd v3/examples/gin-routing
go mod tidy
go run .

Documentation

Please consult the Using Gin for Routing guide for a detailed explanation of the example.